InvokeCommandExt
trait · ferroui-reactiveui · v0.5.0
trait InvokeCommandExt<T>
The InvokeCommand methods of ReactiveUIBindingExtensions, on an observable.
Deviation (DEVIATIONS.md, ReactiveUI): the overload that names the property holding the command
takes a PropertyPath (prop!(VM => command)) and is
invoke_command_path; upstream's generator writes its dispatch
from the lambda, and its InvokeCommandUnsafe reads the expression by reflection. An error of
the values is rethrown where it is raised: here it panics. The null checks of the arguments
have no counterpart.
Members
invoke_command
fn invoke_command(self: &Self, command: impl ICommand + 'static) -> Rc<dyn IDisposable>
Executes command with each value of the sequence that it can execute
(InvokeCommand<T>(IObservable<T>, ICommand)); disposing the result stops it.
invoke_command_path
fn invoke_command_path<V: 'static, C: ICommand + Clone + PartialEq + 'static>(self: &Self, target: Option<Rc<V>>, command_property: PropertyPath<Rc<V>, Option<C>>) -> Rc<dyn IDisposable>
Executes the command that command_property of target holds with each value of the
sequence, skipping a value while there is no command or it cannot execute the value; the
property is observed, so a command set later is used from then on
(InvokeCommand<T, TTarget>(IObservable<T>, TTarget?, Expression<Func<TTarget, ICommand?>>)).
Without a target nothing is subscribed. Disposing the result stops the executions and the
observation.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.