# ConnectableObservable

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactive/subjects/struct-connectableobservable/

**struct** · [`ferroui-reactive`](/docs/0.5.0/api/ferroui-reactive/) · v0.5.0

```rust
struct ConnectableObservable<TSource, TResult>
```

Shares one subscription of a source among the observers of a subject (`ConnectableObservable`):
observers subscribe to the subject, and `connect` subscribes
the subject to the source.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/subjects/connectable_observable.rs#L19)

## Members

- [`new`](#function-new)

<a id="function-new"></a>

### new

```rust
fn new(source: Rc<dyn IObservable<TSource>>, subject: Rc<dyn ISubjectHandle<TSource, TResult>>) -> Rc<Self>
```

Shares `source` through `subject`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/subjects/connectable_observable.rs#L38)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`SubscribeGuard<T>`](/docs/0.5.0/api/ferroui-base/reactive/use-subscribeguard/)
- [`IConnectableObservable<TResult>`](/docs/0.5.0/api/ferroui-reactive/subjects/trait-iconnectableobservable/)
- [`IObservable<TResult>`](/docs/0.5.0/api/ferroui-base/reactive/use-iobservable/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
