# SwitchSource

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/mixins/trait-switchsource/

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

```rust
trait SwitchSource<T>
```

A value that is an observable of `T`: an observable, or a reactive command (whose results are
its values). It is the element of the sources `SwitchSubscribeMixins::switch_subscribe`
takes, which upstream overloads for `IObservable<IObservable<T>?>` and for
`IObservable<IReactiveCommand<TParam, TResult>?>`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/mixins/switch_subscribe_mixins.rs#L17)

## Members

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

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

### as_switch_source

```rust
fn as_switch_source(self: &Self) -> Rc<dyn IObservable<T>>
```

The value as an observable.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/mixins/switch_subscribe_mixins.rs#L19)

## Trait implementations

- [`SwitchSource<T>`](/docs/0.5.0/api/ferroui-reactiveui/mixins/trait-switchsource/)
- [`SwitchSource<R>`](/docs/0.5.0/api/ferroui-reactiveui/mixins/trait-switchsource/)

## Availability

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