ObjectPropertyChangedObservable
struct · ferroui-base · v0.5.0
struct ObjectPropertyChangedObservable
The change notifications of one property on one object.
Returned by
get_property_changed_observable.
Change notifications borrow their values, so handlers are closures rather
than observers. The object is held weakly.
Members
subscribe
fn subscribe(self: &Self, handler: impl Fn(&FerroPropertyChangedEventArgs<'_>) -> () + 'static) -> Subscription
Subscribes to changes of the property on the object.
Dropping the returned guard removes the handler; call
detach to keep it for the life of the
object.
add_class_handler
fn add_class_handler<TTarget: ObjectType>(self: &Self, handler: impl Fn(&TTarget, &FerroPropertyChangedEventArgs<'_>) -> () + 'static) -> Subscription
Subscribes a handler that is only invoked when the object is of class
TTarget (or a class derived from it).
Dropping the returned guard removes the handler; call
detach to keep it for the life of the
object.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherClone
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.