pub struct CommandInvoker;Expand description
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.
Implementations§
Source§impl CommandInvoker
impl CommandInvoker
Sourcepub fn invoke<T: 'static>(
source: &Rc<dyn IObservable<T>>,
command: Rc<dyn ICommand>,
) -> Rc<dyn IDisposable>
pub 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.
Sourcepub fn invoke_observed<T: 'static>(
source: &Rc<dyn IObservable<T>>,
commands: &Rc<dyn IObservable<Option<Rc<dyn ICommand>>>>,
) -> Rc<dyn IDisposable>
pub 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.