# ObservableForPropertySink

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/binding/observable_for_property/struct-observableforpropertysink/

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

```rust
struct ObservableForPropertySink<T: 'static, V: 'static>
```

Produces the value of a property on subscription, unless skipped, and again on each
notification of a property observer (`ObservableForPropertySink<TSender, TValue>`).

The value is read with the getter on every notification; the value of the notification is not
used. The errors and the completion of the notifications pass through.

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

## Members

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

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

### new

```rust
fn new(sender: &Rc<T>, expression: impl Into<String>, notifications: Rc<dyn IObservable<ObservedChange<PropertyOwner, ()>>>, read_value: impl Fn(&Rc<T>) -> V + 'static, skip_initial: bool, comparer: Option<ValueComparer<V>>) -> Self
```

The values of the property `expression` of `sender`, read with `read_value` on each of
`notifications`; `comparer`, when given, drops a value equal to the last one
(`isDistinct`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/observable_for_property/observable_for_property_sink.rs#L30)

## 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/)
- [`IObservable<ObservedChange<Rc<T>, V>>`](/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/).
