FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ICommand

    trait · ferroui-base · v0.5.0

    trait ICommand
    

    Defines a command.

    Commands compare by reference.

    View source

    Members

    can_execute

    fn can_execute(self: &Self, parameter: Option<&BoxedValue>) -> bool
    

    Defines the method that determines whether the command can execute in its current state. parameter is data used by the command; if the command does not require data, it can be None.

    Source

    execute

    fn execute(self: &Self, parameter: Option<&BoxedValue>)
    

    Defines the method to be called when the command is invoked.

    Source

    can_execute_changed

    fn can_execute_changed(self: &Self, handler: Rc<dyn Fn() -> ()>) -> Rc<dyn IDisposable>
    

    Occurs when changes occur that affect whether or not the command should execute. Disposing the returned handle unsubscribes.

    Source

    Trait implementations

    Availability

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