# ReactiveUIBindingExtensions

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

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

```rust
trait ReactiveUIBindingExtensions<T: 'static>
```

The observation of the properties of an object (`ReactiveUIBindingExtensions`: `WhenAnyValue`,
`WhenAny`, `WhenAnyObservable`, `WhenChanged`, `WhenChanging`); implemented for every `Rc<T>`,
so that `vm.when_any_value(prop!(VM => name))` works.

The paths are one argument: one `PropertyPath`
or a tuple of 2 to 16 ([`WhenAnyPaths`](/docs/0.5.0/api/ferroui-reactiveui/binding/mixins/trait-whenanypaths/)). The observation holds the object weakly.

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

## Members

- [`when_any_value`](#function-when_any_value)
- [`when_any_value_select`](#function-when_any_value_select)
- [`when_any`](#function-when_any)
- [`when_any_observable`](#function-when_any_observable)
- [`when_any_observable_select`](#function-when_any_observable_select)
- [`when_changed`](#function-when_changed)
- [`when_changed_select`](#function-when_changed_select)
- [`when_changing`](#function-when_changing)
- [`when_changing_select`](#function-when_changing_select)

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

### when_any_value

```rust
fn when_any_value<P: WhenAnyPaths<T>>(self: &Self, paths: P) -> Rc<dyn IObservable<<P as >::Values>>
```

The latest values of `paths`: the current values on subscription, then the values after
each change of any step of any path, skipping repeats (`WhenAnyValue`). The values of a
tuple of paths are a tuple (upstream's `PropertyValues<T1, ..., Tn>`).

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

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

### when_any_value_select

```rust
fn when_any_value_select<P: WhenAnyPaths<T>, R: 'static>(self: &Self, paths: P, selector: impl Fn(<P as >::Values) -> R + 'static) -> Rc<dyn IObservable<R>>
```

`when_any_value` projected by `selector`, which takes the values
as one value or one tuple (`WhenAnyValue(..., Func<T1, ..., TRet>)`).

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

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

### when_any

```rust
fn when_any<P: WhenAnyPaths<T>, R: 'static>(self: &Self, paths: P, selector: impl Fn(<P as >::Changes) -> R + 'static) -> Rc<dyn IObservable<R>>
```

The latest changes of `paths` projected by `selector`, which takes the changes (with their
senders and paths) as one change or one tuple (`WhenAny`).

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

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

### when_any_observable

```rust
fn when_any_observable<P: WhenAnyObservablePaths<T>>(self: &Self, paths: P) -> Rc<dyn IObservable<<P as >::Item>>
```

The values of the latest observable that each of `paths` holds, merged
(`WhenAnyObservable`); a path may hold `Rc<dyn IObservable<R>>` or an `Option` of it.

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

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

### when_any_observable_select

```rust
fn when_any_observable_select<P: WhenAnyObservableCombinePaths<T>, R: 'static>(self: &Self, paths: P, selector: impl Fn(<P as >::Items) -> R + 'static) -> Rc<dyn IObservable<R>>
```

The latest values of the latest observable that each of `paths` holds, combined by
`selector`, which takes them as one tuple (`WhenAnyObservable(..., Func<T1?, ..., TRet>)`).

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

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

### when_changed

```rust
fn when_changed<P: WhenAnyPaths<T>>(self: &Self, paths: P) -> Rc<dyn IObservable<<P as >::Values>>
```

The latest values of `paths` after each change, starting with the current values and
skipping repeats (`WhenChanged`).

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

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

### when_changed_select

```rust
fn when_changed_select<P: WhenAnyPaths<T>, R: 'static>(self: &Self, paths: P, conversion: impl Fn(<P as >::Values) -> R + 'static) -> Rc<dyn IObservable<R>>
```

`when_changed` converted by `conversion`
(`WhenChanged(..., Func<T1, ..., TReturn>)`).

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

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

### when_changing

```rust
fn when_changing<P: WhenAnyPaths<T>>(self: &Self, paths: P) -> Rc<dyn IObservable<<P as >::Values>>
```

The latest values of `paths` before each change, starting with the current values
(`WhenChanging`); for a path of one property each notification is reported, even with the
value of the last one (a deeper path drops repeats).

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

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

### when_changing_select

```rust
fn when_changing_select<P: WhenAnyPaths<T>, R: 'static>(self: &Self, paths: P, conversion: impl Fn(<P as >::Values) -> R + 'static) -> Rc<dyn IObservable<R>>
```

`when_changing` converted by `conversion`
(`WhenChanging(..., Func<T1, ..., TReturn>)`).

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

## Trait implementations

- [`ReactiveUIBindingExtensions<T>`](/docs/0.5.0/api/ferroui-reactiveui/binding/mixins/trait-reactiveuibindingextensions/)

## Availability

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