FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RoutedEventObservable

    struct · ferroui-base · v0.5.0

    struct RoutedEventObservable
    

    The stream of (sender, args) notifications of a routed event: one for every element on the route of every raise. This is what class handlers are built on.

    View source

    Members

    subscribe

    fn subscribe(self: &'static Self, handler: impl Fn(&Interactive, &dyn IRoutedEventArgs) -> () + 'static) -> Subscription
    

    Subscribes to the notifications. Dropping the returned guard unsubscribes; Subscription::detach keeps the subscription for the life of the event.

    Source

    has_observers

    fn has_observers(self: &Self) -> bool
    

    Whether there is any subscriber.

    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.