FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    PropertyChangedObservable

    struct · ferroui-base · v0.5.0

    struct PropertyChangedObservable
    

    The stream of change notifications of a property across all objects.

    View source

    Members

    subscribe

    fn subscribe(self: &'static Self, handler: impl Fn(&FerroPropertyChangedEventArgs<'_>) -> () + 'static) -> Subscription
    

    Subscribes to changes of the property on any object.

    Dropping the returned guard removes the handler; call detach to keep it for the life of the property.

    Source

    add_class_handler

    fn add_class_handler<TTarget: ObjectType>(self: &'static Self, handler: impl Fn(&TTarget, &FerroPropertyChangedEventArgs<'_>) -> () + 'static) -> Subscription
    

    Subscribes a handler that is only invoked for objects of class TTarget (or classes derived from it).

    Dropping the returned guard removes the handler; call detach to keep it for the life of the property, as a class handler registered once for its class does.

    Source

    Trait implementations

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

    Availability

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