# ReactiveExtensions

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-diagnostics/diagnostics/view_models/struct-reactiveextensions/

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

```rust
struct ReactiveExtensions
```

Observables of the properties of view models.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/reactive_extensions.rs#L8)

## Members

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

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

### get_observable

```rust
fn get_observable<TOwner, TValue>(vm: &Rc<TOwner>, property_name: &'static str, property: impl Fn(&TOwner) -> TValue + 'static, fire_immediately: bool) -> Rc<dyn IObservable<TValue>>
where TOwner: INotifyPropertyChanged + ?Sized + 'static,
      TValue: 'static
```

`vm.GetObservable(x => x.Property, fireImmediately)`: an observable of
the values of a property of a view model, produced again whenever the
view model notifies a change of the property.

The original takes the property as an expression and reads its name
and its value through reflection; here the name of the property and
the function that reads it are passed. When `fire_immediately` is set,
each observer receives the current value when it subscribes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/reactive_extensions.rs#L19)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`

## Availability

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