FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CommandInvoker

    struct · ferroui-reactiveui · v0.5.0

    struct CommandInvoker
    

    Executes a command with each value of an observable as its parameter, skipping a value the command cannot execute (CommandInvoker).

    An error of the values, or of the observable of commands, is rethrown where it is raised (ExceptionDispatchInfo.Throw): here it panics with its message.

    Deviation (DEVIATIONS.md, ReactiveUI): the overload on an observable of commands is invoke_observed; the null checks of the arguments have no counterpart.

    View source

    Members

    invoke

    fn invoke<T: 'static>(source: &Rc<dyn IObservable<T>>, command: Rc<dyn ICommand>) -> Rc<dyn IDisposable>
    

    Executes command with each value of source that it can execute (Invoke<T>(IObservable<T>, ICommand)); disposing the result stops it.

    Source

    invoke_observed

    fn invoke_observed<T: 'static>(source: &Rc<dyn IObservable<T>>, commands: &Rc<dyn IObservable<Option<Rc<dyn ICommand>>>>) -> Rc<dyn IDisposable>
    

    Executes the latest command of commands with each value of source that it can execute, and nothing while there is none (Invoke<T>(IObservable<T>, IObservable<ICommand?>)); disposing the result ends both subscriptions.

    Source

    Trait implementations

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

    Availability

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