FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    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.

    Source

    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.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.