CallbackPropertyObservable
struct · ferroui-reactiveui · v0.5.0
struct CallbackPropertyObservable<S: 'static, V: 'static>
Observes a property through a change callback of its own: the value on subscription, then the
value each time the callback runs (CallbackPropertyObservable<TSource, TValue>).
An observer of a native mechanism (a property of a FerroUI object, a platform event) passes
what attaches to its notification as subscribe. The sequence never completes. Disposing a
subscription detaches it once, however many times it is disposed.
Members
new
fn new(source: S, subscribe: impl Fn(&S, Rc<dyn Fn() -> ()>) -> Rc<dyn IDisposable> + 'static, getter: impl Fn(&S) -> V + 'static, distinct: bool) -> Self
where V: PartialEq
The values of getter on source, read again each time the callback that subscribe
attaches runs; with distinct, a value equal to the last one is dropped.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnySubscribeGuard<T>IObservable<V>
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.