# PluginPropertyObservable

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

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

```rust
struct PluginPropertyObservable<T: 'static>
```

Observes one property through a registered property observer that outranks the mechanism the
caller chose, reading the value with the caller's getter (`PluginPropertyObservable<T>`).

The observer says when the property changed; the value is read with the getter, never from the
notification. The current value is produced on subscription and again after each
notification. An error or the completion of the observer's notifications is passed on after
any value still waiting to be read.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/observables/plugin_property_observable.rs#L20)

## Members

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

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

### new

```rust
fn new(plugin: Rc<dyn ICreatesObservableForProperty>, source: &PropertyOwner, property_name: impl Into<String>, getter: impl Fn() -> Option<T> + 'static, before_change: bool, distinct_until_changed: bool) -> Self
where T: PartialEq
```

The values of `property_name` of `source`, read with `getter` after each notification of
`plugin`; with `distinct_until_changed`, a value equal to the last one is dropped.

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

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

### with_comparer

```rust
fn with_comparer(plugin: Rc<dyn ICreatesObservableForProperty>, source: &PropertyOwner, property_name: impl Into<String>, getter: impl Fn() -> Option<T> + 'static, before_change: bool, comparer: Option<ValueComparer<T>>) -> Self
```

`new` with the comparison of the distinct gate as a closure (`None`: no gate).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/observables/plugin_property_observable.rs#L49)

## 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<T>`](/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/).
