FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ToEvent

    struct · ferroui-reactiveui · v0.5.0

    struct ToEvent<C>
    

    The event of a control that executes a bound command (string? toEvent).

    ToEvent::event names the event and reads it from the control, as upstream's source generator resolves a literal event name at compile time: the command binds to it directly, unless a registered binder has a higher affinity for the control than the binding to an event (BindingAffinity::DEFAULT_EVENT). ToEvent::named only names it, and the registered binder with the highest affinity for the control binds it (ICreatesCommandBinding::bind_command_to_object_event).

    View source

    Members

    named

    fn named(name: impl Into<String>) -> Self
    

    The event named name, bound by a registered binder.

    Source

    event

    fn event<A: ?Sized + 'static>(name: impl Into<String>, event: fn(&C) -> &Event<A>) -> Self
    

    The event named name that event reads from the control.

    Source

    subscription

    fn subscription(name: impl Into<String>, subscription: ControlEventSubscription<C>) -> Self
    

    The event named name that subscription adds a handler to.

    Source

    name

    fn name(self: &Self) -> &str
    

    The name of the event.

    Source

    Trait implementations

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

    Availability

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