CombinedReactiveCommand
struct · ferroui-reactiveui · v0.5.0
struct CombinedReactiveCommand<P, R>
A command that executes child commands together (CombinedReactiveCommand<TParam, TResult>):
its result is the list of the results of the children. It is a shared handle: clones are the
same command.
Members
new
fn new(child_commands: impl IntoIterator<Item = Rc<dyn IReactiveCommandOf<P, R>>>, can_execute: Option<Rc<dyn IObservable<bool>>>, output_scheduler: Option<Rc<dyn IScheduler>>) -> Self
A command that executes child_commands together, gated by can_execute (always
executable when None) and every child, with its streams on output_scheduler
(RxSchedulers::main_thread_scheduler when
None) (protected internal CombinedReactiveCommand(IEnumerable<ReactiveCommandBase<TParam, TResult>>, IObservable<bool>?, IScheduler?) and its two shorter overloads).
Panics
When there is no child command (ArgumentException: No child commands provided.).
can_execute
fn can_execute(self: &Self) -> Rc<dyn IObservable<bool>>
Whether the combined command can execute (CanExecute): the parent gate and every child
can, and no execution is in flight.
is_executing
fn is_executing(self: &Self) -> Rc<dyn IObservable<bool>>
Whether the combined command is executing (IsExecuting).
thrown_exceptions
fn thrown_exceptions(self: &Self) -> Rc<dyn IObservable<ObservableError>>
The errors of the children and of the parent gate (ThrownExceptions).
execute
fn execute(self: &Self, parameter: P) -> Rc<dyn IObservable<Vec<R>>>
An observable that executes every child with parameter when it is subscribed, and
notifies the list of their results (Execute(TParam)).
execute_default
fn execute_default(self: &Self) -> Rc<dyn IObservable<Vec<R>>>
execute with the default parameter (Execute()).
as_observable
fn as_observable(self: &Self) -> Rc<dyn IObservable<Vec<R>>>
The command as the observable of its results, which the operators take.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedSubscribeGuard<T>CommandValueClonePartialEqDebugIObservable<Vec<R>>IDisposableIHandleObservableErrorsIReactiveCommandIReactiveCommandOf<P, Vec<R>>ICommand
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.