FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    WeakEventHandlerTarget

    trait · ferroui-base · v0.5.0

    trait WeakEventHandlerTarget<A: WeakEventArgs + ?Sized>
    

    The events of a type, found by name: what the managed original looks up through reflection on the target type.

    View source

    Members

    add_event_handler

    fn add_event_handler(self: &Self, event_name: &str, handler: Rc<WeakEventHandler<A>>) -> Option<Box<dyn FnOnce() -> ()>>
    

    Adds handler to the event named event_name and returns the action that removes it, or None if the type has no such event.

    The action must not hold the target strongly: the target holds the subscription through the handler, and the subscription holds the action.

    Source

    Availability

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