Observable
struct · ferroui-reactive · v0.5.0
struct Observable
The static members of Observable.
Members
createcreate_with_actionemptyempty_with_witnessempty_onempty_on_with_witnessnevernever_with_witnessreturn_return_onthrowthrow_with_witnessthrow_onthrow_on_with_witnesscreate_iteratortry_create_iteratorcreate_iterator_voidtry_create_iterator_voidstart_asyncstart_async_onstart_async_with_tokenstart_async_with_token_onfrom_asyncfrom_async_onfrom_async_with_tokenfrom_async_with_token_onto_asyncto_async_ontry_to_asynctry_to_async_oncreate_asynccreate_async_with_tokencreate_async_with_disposablecreate_async_with_disposable_with_tokencreate_async_with_actioncreate_async_with_action_with_tokendefer_asyncdefer_async_with_tokenusing_asyncif_if_thenif_then_ontry_iftry_if_thentry_if_then_oncase_with_defaultcasecase_ontry_case_with_defaulttry_casetry_case_onfor_try_forwhile_try_whilewhentry_whenfrom_eventfrom_event_onfrom_event_conversionfrom_event_conversion_ontry_from_event_conversiontry_from_event_conversion_onfrom_event_actionfrom_event_action_onfrom_event_patternfrom_event_pattern_onfrom_event_pattern_conversionfrom_event_pattern_conversion_ontry_from_event_pattern_conversiontry_from_event_pattern_conversion_onfork_join_allzip_allzip_all_withtry_zip_all_withcombine_latest_allcombine_latest_all_withtry_combine_latest_all_withmerge_allmerge_all_onmerge_all_maxmerge_all_max_onconcat_allamb_alldefertry_deferrangerange_onrepeatrepeat_onrepeat_countrepeat_count_ongenerategenerate_ontry_generatetry_generate_ongenerate_aftergenerate_after_ontry_generate_aftertry_generate_after_ongenerate_atgenerate_at_ontry_generate_attry_generate_at_onusingtry_usingstartstart_ontry_starttry_start_onstart_actionstart_action_ontry_start_actiontry_start_action_onto_observableto_observable_ontry_to_observabletry_to_observable_onsubscribe_enumerablesubscribe_enumerable_ontimertimer_attimer_periodictimer_at_periodictimer_ontimer_at_ontimer_periodic_ontimer_at_periodic_onintervalinterval_oncatch_alltry_catch_allon_error_resume_next_alltry_on_error_resume_next_all
create
fn create<T: 'static>(subscribe: impl Fn(Rc<dyn IObserver<T>>) -> Rc<dyn IDisposable> + 'static) -> Rc<dyn IObservable<T>>
A sequence whose subscription is subscribe, which returns the disposable that ends it
(Create<TResult>(Func<IObserver<TResult>, IDisposable>)). The observer it receives ignores
everything after a terminal notification, and a terminal notification disposes the
subscription.
create_with_action
fn create_with_action<T: 'static, A: FnOnce() -> () + 'static>(subscribe: impl Fn(Rc<dyn IObserver<T>>) -> A + 'static) -> Rc<dyn IObservable<T>>
A sequence whose subscription is subscribe, which returns the action that ends it
(Create<TResult>(Func<IObserver<TResult>, Action>)).
empty
fn empty<T: 'static>() -> Rc<dyn IObservable<T>>
A sequence that ends at once (Empty<TResult>()).
empty_with_witness
fn empty_with_witness<T: 'static>(_witness: T) -> Rc<dyn IObservable<T>>
empty, with a value that only names the type of the sequence
(Empty<TResult>(TResult witness)).
empty_on
fn empty_on<T: 'static>(scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
A sequence that ends on scheduler (Empty<TResult>(IScheduler)).
empty_on_with_witness
fn empty_on_with_witness<T: 'static>(scheduler: Rc<dyn IScheduler>, _witness: T) -> Rc<dyn IObservable<T>>
empty_on, with a value that only names the type of the sequence
(Empty<TResult>(IScheduler, TResult witness)).
never
fn never<T: 'static>() -> Rc<dyn IObservable<T>>
A sequence that never notifies (Never<TResult>()).
never_with_witness
fn never_with_witness<T: 'static>(_witness: T) -> Rc<dyn IObservable<T>>
never, with a value that only names the type of the sequence
(Never<TResult>(TResult witness)).
return_
fn return_<T: Clone + 'static>(value: T) -> Rc<dyn IObservable<T>>
A sequence of one value, on the scheduler of constant-time operations, the immediate one
(Return<TResult>(TResult)).
return_on
fn return_on<T: Clone + 'static>(value: T, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
A sequence of one value, on scheduler (Return<TResult>(TResult, IScheduler)); on the
immediate scheduler the value and the end are notified at once.
throw
fn throw<T: 'static>(error: ObservableError) -> Rc<dyn IObservable<T>>
A sequence that ends with error, on the scheduler of constant-time operations, the
immediate one (Throw<TResult>(Exception)).
throw_with_witness
fn throw_with_witness<T: 'static>(error: ObservableError, _witness: T) -> Rc<dyn IObservable<T>>
throw, with a value that only names the type of the sequence
(Throw<TResult>(Exception, TResult witness)).
throw_on
fn throw_on<T: 'static>(error: ObservableError, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
A sequence that ends with error, on scheduler (Throw<TResult>(Exception, IScheduler));
on the immediate scheduler the error is notified at once.
throw_on_with_witness
fn throw_on_with_witness<T: 'static>(error: ObservableError, scheduler: Rc<dyn IScheduler>, _witness: T) -> Rc<dyn IObservable<T>>
throw_on, with a value that only names the type of the sequence
(Throw<TResult>(Exception, IScheduler, TResult witness)).
create_iterator
fn create_iterator<R: 'static, X: 'static, I>(iterator_method: impl Fn(Rc<dyn IObserver<R>>) -> I + 'static) -> Rc<dyn IObservable<R>>
where I: IntoIterator<Item = Rc<dyn IObservable<X>>> + 'static,
<I as >::IntoIter: 'static
The sequence of the values that iterator_method sends to the observer it is given; the
sequences it yields are subscribed to one after another, and only their end (an error, or
the completion of the last one) is notified
(ObservableEx.Create<TResult>(Func<IObserver<TResult>, IEnumerable<IObservable<object>>>)).
The next sequence is asked of the iterator only when the previous one completes.
Deviation (DEVIATIONS.md, Reactive): upstream's yielded sequences are IObservable<object>;
the port has no common object type, so they are sequences of one type X, a parameter of
the method (() when the values do not matter).
try_create_iterator
fn try_create_iterator<R: 'static, X: 'static, I>(iterator_method: impl Fn(Rc<dyn IObserver<R>>) -> Result<I, ObservableError> + 'static) -> Rc<dyn IObservable<R>>
where I: IntoIterator<Item = Result<Rc<dyn IObservable<X>>, ObservableError>> + 'static,
<I as >::IntoIter: 'static
create_iterator with an iterator method that may fail: an Err
returned by iterator_method is the method throwing, an Err item is the iterator
throwing; either ends the sequence with that error
(ObservableEx.Create<TResult>(Func<IObserver<TResult>, IEnumerable<IObservable<object>>>)).
Deviation (DEVIATIONS.md, Reactive): the yielded sequences are of one type X, where
upstream's are IObservable<object>.
create_iterator_void
fn create_iterator_void<X: 'static, I>(iterator_method: impl Fn() -> I + 'static) -> Rc<dyn IObservable<()>>
where I: IntoIterator<Item = Rc<dyn IObservable<X>>> + 'static,
<I as >::IntoIter: 'static
The end of the sequences that iterator_method yields, subscribed to one after another
(ObservableEx.Create(Func<IEnumerable<IObservable<object>>>)). As upstream's, the
sequence notifies no value (its observer is a TerminalOnlyObserver<Unit>), only the error
of a sequence or the completion of the last one. The next sequence is asked of the
iterator only when the previous one completes.
Deviation (DEVIATIONS.md, Reactive): the yielded sequences are of one type X, where
upstream's are IObservable<object>.
try_create_iterator_void
fn try_create_iterator_void<X: 'static, I>(iterator_method: impl Fn() -> Result<I, ObservableError> + 'static) -> Rc<dyn IObservable<()>>
where I: IntoIterator<Item = Result<Rc<dyn IObservable<X>>, ObservableError>> + 'static,
<I as >::IntoIter: 'static
create_iterator_void with an iterator method that may
fail: an Err returned by iterator_method is the method throwing, an Err item is the
iterator throwing; either ends the sequence with that error
(ObservableEx.Create(Func<IEnumerable<IObservable<object>>>)).
Deviation (DEVIATIONS.md, Reactive): the yielded sequences are of one type X, where
upstream's are IObservable<object>.
start_async
fn start_async<T: Clone + 'static, Fut: Future<Output = Result<T, ObservableError>> + 'static>(function_async: impl FnOnce() -> Fut) -> Rc<dyn IObservable<T>>
Runs the future the function gives at once, as a task, and gives a sequence of its outcome:
a hot sequence, shared by its subscriptions (StartAsync(Func<Task<TResult>>),
StartAsync(Func<Task>) for T = ()).
start_async_on
fn start_async_on<T: Clone + 'static, Fut: Future<Output = Result<T, ObservableError>> + 'static>(function_async: impl FnOnce() -> Fut, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
start_async with the notifications on scheduler
(StartAsync(Func<Task<TResult>>, TaskObservationOptions)).
start_async_with_token
fn start_async_with_token<T: Clone + 'static, Fut: Future<Output = Result<T, ObservableError>> + 'static>(function_async: impl FnOnce(CancellationToken) -> Fut) -> Rc<dyn IObservable<T>>
start_async with a cancellation token, which disposing a subscription
cancels (StartAsync(Func<CancellationToken, Task<TResult>>)).
start_async_with_token_on
fn start_async_with_token_on<T: Clone + 'static, Fut: Future<Output = Result<T, ObservableError>> + 'static>(function_async: impl FnOnce(CancellationToken) -> Fut, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
start_async_with_token with the notifications on
scheduler (StartAsync(Func<CancellationToken, Task<TResult>>, TaskObservationOptions)).
from_async
fn from_async<T: Clone + 'static, Fut: Future<Output = Result<T, ObservableError>> + 'static>(function_async: impl Fn() -> Fut + 'static) -> Rc<dyn IObservable<T>>
Runs the future the function gives for each subscription, as a task, and gives a sequence
of its outcome (FromAsync(Func<Task<TResult>>), FromAsync(Func<Task>) for T = ()):
Defer of StartAsync.
from_async_on
fn from_async_on<T: Clone + 'static, Fut: Future<Output = Result<T, ObservableError>> + 'static>(function_async: impl Fn() -> Fut + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
from_async with the notifications on scheduler
(FromAsync(Func<Task<TResult>>, TaskObservationOptions)).
from_async_with_token
fn from_async_with_token<T: Clone + 'static, Fut: Future<Output = Result<T, ObservableError>> + 'static>(function_async: impl Fn(CancellationToken) -> Fut + 'static) -> Rc<dyn IObservable<T>>
from_async with a cancellation token, which disposing the
subscription cancels (FromAsync(Func<CancellationToken, Task<TResult>>)).
from_async_with_token_on
fn from_async_with_token_on<T: Clone + 'static, Fut: Future<Output = Result<T, ObservableError>> + 'static>(function_async: impl Fn(CancellationToken) -> Fut + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
from_async_with_token with the notifications on
scheduler (FromAsync(Func<CancellationToken, Task<TResult>>, TaskObservationOptions)).
to_async
fn to_async<Args, R, F: ToAsyncFunction<Args, R>>(function: F) -> <F as >::Async
The asynchronous form of function (a closure of 0 to 16 arguments): each call runs it on
the scheduler of asynchronous conversions and gives a sequence of its result, kept for every
observer (ToAsync(Func<.., TResult>), ToAsync(Action<..>) for a closure returning ()).
The argument types of the closure must be written out (|a: i32, b: i32| a + b), since they
choose the arity.
to_async_on
fn to_async_on<Args, R, F: ToAsyncFunction<Args, R>>(function: F, scheduler: Rc<dyn IScheduler>) -> <F as >::Async
to_async running the function on scheduler
(ToAsync(Func<.., TResult>, IScheduler), ToAsync(Action<..>, IScheduler)).
try_to_async
fn try_to_async<Args, R, F: TryToAsyncFunction<Args, R>>(function: F) -> <F as >::Async
to_async of a function that may fail: the sequence of a call that fails
ends with its error (ToAsync of a function that throws).
try_to_async_on
fn try_to_async_on<Args, R, F: TryToAsyncFunction<Args, R>>(function: F, scheduler: Rc<dyn IScheduler>) -> <F as >::Async
try_to_async running the function on scheduler.
create_async
fn create_async<T: 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>(subscribe_async: impl Fn(Rc<dyn IObserver<T>>) -> Fut + 'static) -> Rc<dyn IObservable<T>>
A sequence whose subscription is an asynchronous function: the future it returns runs as a
task (the flatten() of a Shared is used as it is), and the sequence ends when the task
ends, with its error when it fails or is canceled
(Create<TResult>(Func<IObserver<TResult>, Task>)).
create_async_with_token
fn create_async_with_token<T: 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>(subscribe_async: impl Fn(Rc<dyn IObserver<T>>, CancellationToken) -> Fut + 'static) -> Rc<dyn IObservable<T>>
create_async with a token that disposing the subscription cancels
(Create<TResult>(Func<IObserver<TResult>, CancellationToken, Task>)).
create_async_with_disposable
fn create_async_with_disposable<T: 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>(subscribe_async: impl Fn(Rc<dyn IObserver<T>>) -> Fut + 'static) -> Rc<dyn IObservable<T>>
A sequence whose subscription is an asynchronous function whose task gives the disposable
that ends the subscription; disposing the subscription before the task ends disposes the
disposable as soon as it arrives. An error of the task is the error of the sequence; its end
does not end the sequence (Create<TResult>(Func<IObserver<TResult>, Task<IDisposable>>)).
create_async_with_disposable_with_token
fn create_async_with_disposable_with_token<T: 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>(subscribe_async: impl Fn(Rc<dyn IObserver<T>>, CancellationToken) -> Fut + 'static) -> Rc<dyn IObservable<T>>
create_async_with_disposable with a token that
disposing the subscription cancels
(Create<TResult>(Func<IObserver<TResult>, CancellationToken, Task<IDisposable>>)).
create_async_with_action
fn create_async_with_action<T: 'static, A: FnOnce() -> () + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>(subscribe_async: impl Fn(Rc<dyn IObserver<T>>) -> Fut + 'static) -> Rc<dyn IObservable<T>>
A sequence whose subscription is an asynchronous function whose task gives the action that
ends the subscription; disposing the subscription before the task ends runs the action as
soon as it arrives. An error of the task is the error of the sequence; its end does not end
the sequence (Create<TResult>(Func<IObserver<TResult>, Task<Action>>)).
create_async_with_action_with_token
fn create_async_with_action_with_token<T: 'static, A: FnOnce() -> () + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>(subscribe_async: impl Fn(Rc<dyn IObserver<T>>, CancellationToken) -> Fut + 'static) -> Rc<dyn IObservable<T>>
create_async_with_action with a token that disposing
the subscription cancels (Create<TResult>(Func<IObserver<TResult>, CancellationToken, Task<Action>>)).
defer_async
fn defer_async<T: 'static, Fut: Future<Output = Result<Rc<dyn IObservable<T>>, ObservableError>> + 'static>(observable_factory_async: impl Fn() -> Fut + 'static) -> Rc<dyn IObservable<T>>
Runs the future the factory gives for each subscription, as a task, and subscribes to the
sequence it gives; an error of the task is the error of the sequence
(Defer<TResult>(Func<Task<IObservable<TResult>>>)).
defer_async_with_token
fn defer_async_with_token<T: 'static, Fut: Future<Output = Result<Rc<dyn IObservable<T>>, ObservableError>> + 'static>(observable_factory_async: impl Fn(CancellationToken) -> Fut + 'static) -> Rc<dyn IObservable<T>>
defer_async with a token, which disposing the subscription cancels
(DeferAsync<TResult>(Func<CancellationToken, Task<IObservable<TResult>>>)).
using_async
fn using_async<T: 'static, R: IDisposable + ?Sized + 'static, FutR, FutO>(resource_factory_async: impl Fn(CancellationToken) -> FutR + 'static, observable_factory_async: impl Fn(Rc<R>, CancellationToken) -> FutO + 'static) -> Rc<dyn IObservable<T>>
where FutR: Future<Output = Result<Rc<R>, ObservableError>> + 'static,
FutO: Future<Output = Result<Rc<dyn IObservable<T>>, ObservableError>> + 'static
A sequence that, for each subscription, runs the future of resource_factory_async as a
task, then the future observable_factory_async gives for the resource, and subscribes to
the sequence it gives; the resource is disposed when that subscription ends. Each factory
is given a token that disposing the subscription cancels
(Using<TResult, TResource>(Func<CancellationToken, Task<TResource>>, Func<TResource, CancellationToken, Task<IObservable<TResult>>>)).
if_
fn if_<T: 'static>(condition: impl Fn() -> bool + 'static, then_source: Rc<dyn IObservable<T>>, else_source: Rc<dyn IObservable<T>>) -> Rc<dyn IObservable<T>>
The values of then_source when condition holds at the subscription, else those of
else_source (If<TResult>(Func<bool>, IObservable<TResult>, IObservable<TResult>)).
if_then
fn if_then<T: 'static>(condition: impl Fn() -> bool + 'static, then_source: Rc<dyn IObservable<T>>) -> Rc<dyn IObservable<T>>
The values of then_source when condition holds at the subscription, else an empty
sequence (If<TResult>(Func<bool>, IObservable<TResult>)).
if_then_on
fn if_then_on<T: 'static>(condition: impl Fn() -> bool + 'static, then_source: Rc<dyn IObservable<T>>, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
if_then, whose empty sequence ends on scheduler
(If<TResult>(Func<bool>, IObservable<TResult>, IScheduler)).
try_if
fn try_if<T: 'static>(condition: impl Fn() -> Result<bool, ObservableError> + 'static, then_source: Rc<dyn IObservable<T>>, else_source: Rc<dyn IObservable<T>>) -> Rc<dyn IObservable<T>>
if_ with a condition that may fail; a failure ends the sequence with its error
(If with a condition that throws).
try_if_then
fn try_if_then<T: 'static>(condition: impl Fn() -> Result<bool, ObservableError> + 'static, then_source: Rc<dyn IObservable<T>>) -> Rc<dyn IObservable<T>>
if_then with a condition that may fail.
try_if_then_on
fn try_if_then_on<T: 'static>(condition: impl Fn() -> Result<bool, ObservableError> + 'static, then_source: Rc<dyn IObservable<T>>, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
if_then_on with a condition that may fail.
case_with_default
fn case_with_default<K: Eq + Hash + 'static, T: 'static>(selector: impl Fn() -> K + 'static, sources: HashMap<K, Rc<dyn IObservable<T>>>, default_source: Rc<dyn IObservable<T>>) -> Rc<dyn IObservable<T>>
The values of the sequence of sources whose key selector returns at the subscription, or
of default_source when none has the key
(Case<TValue, TResult>(Func<TValue>, IDictionary<TValue, IObservable<TResult>>, IObservable<TResult>)).
case
fn case<K: Eq + Hash + 'static, T: 'static>(selector: impl Fn() -> K + 'static, sources: HashMap<K, Rc<dyn IObservable<T>>>) -> Rc<dyn IObservable<T>>
case_with_default whose default is an empty sequence
(Case<TValue, TResult>(Func<TValue>, IDictionary<TValue, IObservable<TResult>>)).
case_on
fn case_on<K: Eq + Hash + 'static, T: 'static>(selector: impl Fn() -> K + 'static, sources: HashMap<K, Rc<dyn IObservable<T>>>, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
case_with_default whose default is an empty sequence that ends
on scheduler (Case<TValue, TResult>(Func<TValue>, IDictionary<TValue, IObservable<TResult>>, IScheduler)).
try_case_with_default
fn try_case_with_default<K: Eq + Hash + 'static, T: 'static>(selector: impl Fn() -> Result<K, ObservableError> + 'static, sources: HashMap<K, Rc<dyn IObservable<T>>>, default_source: Rc<dyn IObservable<T>>) -> Rc<dyn IObservable<T>>
case_with_default with a selector that may fail; a failure ends
the sequence with its error (Case with a selector that throws).
try_case
fn try_case<K: Eq + Hash + 'static, T: 'static>(selector: impl Fn() -> Result<K, ObservableError> + 'static, sources: HashMap<K, Rc<dyn IObservable<T>>>) -> Rc<dyn IObservable<T>>
case with a selector that may fail.
try_case_on
fn try_case_on<K: Eq + Hash + 'static, T: 'static>(selector: impl Fn() -> Result<K, ObservableError> + 'static, sources: HashMap<K, Rc<dyn IObservable<T>>>, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
case_on with a selector that may fail.
for_
fn for_<S: 'static, R: 'static, I>(source: I, result_selector: impl Fn(S) -> Rc<dyn IObservable<R>> + 'static) -> Rc<dyn IObservable<R>>
where I: IntoIterator<Item = S> + Clone + 'static,
<I as >::IntoIter: 'static
The values of the sequences result_selector makes of the items of source, one sequence
after another (For<TSource, TResult>(IEnumerable<TSource>, Func<TSource, IObservable<TResult>>)).
Each subscription enumerates source anew.
try_for
fn try_for<S: 'static, R: 'static, I>(source: I, result_selector: impl Fn(S) -> Result<Rc<dyn IObservable<R>>, ObservableError> + 'static) -> Rc<dyn IObservable<R>>
where I: IntoIterator<Item = Result<S, ObservableError>> + Clone + 'static,
<I as >::IntoIter: 'static
for_ over items whose enumeration may fail (an item that is an error is a
MoveNext that throws) and with a selector that may fail; a failure ends the sequence with
its error.
while_
fn while_<T: 'static>(condition: impl Fn() -> bool + 'static, source: Rc<dyn IObservable<T>>) -> Rc<dyn IObservable<T>>
The values of source, repeated for as long as condition holds when the previous
repetition has completed, and at the subscription (While<TSource>(Func<bool>, IObservable<TSource>)).
try_while
fn try_while<T: 'static>(condition: impl Fn() -> Result<bool, ObservableError> + 'static, source: Rc<dyn IObservable<T>>) -> Rc<dyn IObservable<T>>
while_ with a condition that may fail; a failure ends the sequence with its
error (While with a condition that throws).
when
fn when<R: 'static, I>(plans: I) -> Rc<dyn IObservable<R>>
where I: IntoIterator<Item = Plan<R>> + Clone + 'static,
<I as >::IntoIter: 'static
The projections of plans, notified as the values of the sequences of each plan match up
(When<TResult>(params Plan<TResult>[]), When<TResult>(IEnumerable<Plan<TResult>>)). The
sequence completes when every plan has ended (when a sequence of a plan has completed and
its values are used up), and ends with the first error of a sequence. Each subscription
enumerates plans anew.
try_when
fn try_when<R: 'static, I>(plans: impl Fn() -> Result<I, ObservableError> + 'static) -> Rc<dyn IObservable<R>>
where I: IntoIterator<Item = Result<Plan<R>, ObservableError>>,
<I as >::IntoIter: 'static
when over plans whose enumeration may fail: plans starts an enumeration
(GetEnumerator, which fails with an Err), and each item is the next plan or the error of
the step (MoveNext that throws). A failure ends the sequence with its error, before any
subscription.
from_event
fn from_event<T: Clone + 'static, K: 'static>(add_handler: impl Fn(Rc<dyn Fn(T) -> ()>) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static) -> Rc<dyn IObservable<T>>
The arguments of the events of an event whose handlers take them
(FromEvent<TEventArgs>(Action<Action<TEventArgs>>, Action<Action<TEventArgs>>)):
add_handler adds a handler and returns its token, remove_handler removes the handler of a
token. The subscriptions share one handler, added at the first subscription and removed when
the last one is disposed.
from_event_on
fn from_event_on<T: Clone + 'static, K: 'static>(add_handler: impl Fn(Rc<dyn Fn(T) -> ()>) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
from_event, which adds and removes the handler on scheduler
(FromEvent<TEventArgs>(Action<Action<TEventArgs>>, Action<Action<TEventArgs>>, IScheduler)).
from_event_conversion
fn from_event_conversion<D: 'static, T: Clone + 'static, K: 'static>(conversion: impl Fn(Rc<dyn Fn(T) -> ()>) -> D + 'static, add_handler: impl Fn(D) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static) -> Rc<dyn IObservable<T>>
The arguments of the events of an event whose handlers are of the type D, which
conversion makes from the action that notifies the arguments
(FromEvent<TDelegate, TEventArgs>(Func<Action<TEventArgs>, TDelegate>, Action<TDelegate>, Action<TDelegate>)).
from_event_conversion_on
fn from_event_conversion_on<D: 'static, T: Clone + 'static, K: 'static>(conversion: impl Fn(Rc<dyn Fn(T) -> ()>) -> D + 'static, add_handler: impl Fn(D) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
from_event_conversion on scheduler
(FromEvent<TDelegate, TEventArgs>(Func<Action<TEventArgs>, TDelegate>, Action<TDelegate>, Action<TDelegate>, IScheduler)).
try_from_event_conversion
fn try_from_event_conversion<D: 'static, T: Clone + 'static, K: 'static>(conversion: impl Fn(Rc<dyn Fn(T) -> ()>) -> Result<D, ObservableError> + 'static, add_handler: impl Fn(D) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static) -> Rc<dyn IObservable<T>>
from_event_conversion with a conversion that may fail; a
failure ends the subscription with its error (a conversion that throws).
try_from_event_conversion_on
fn try_from_event_conversion_on<D: 'static, T: Clone + 'static, K: 'static>(conversion: impl Fn(Rc<dyn Fn(T) -> ()>) -> Result<D, ObservableError> + 'static, add_handler: impl Fn(D) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
try_from_event_conversion on scheduler.
from_event_action
fn from_event_action<K: 'static>(add_handler: impl Fn(Rc<dyn Fn() -> ()>) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static) -> Rc<dyn IObservable<()>>
The events of an event whose handlers take no arguments, as ()s
(FromEvent(Action<Action>, Action<Action>)).
from_event_action_on
fn from_event_action_on<K: 'static>(add_handler: impl Fn(Rc<dyn Fn() -> ()>) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<()>>
from_event_action on scheduler
(FromEvent(Action<Action>, Action<Action>, IScheduler)).
from_event_pattern
fn from_event_pattern<S: Clone + 'static, A: Clone + 'static, K: 'static>(add_handler: impl Fn(Rc<dyn Fn(S, A) -> ()>) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static) -> Rc<dyn IObservable<EventPattern<S, A>>>
The events of an event whose handlers take a sender and arguments, as EventPatterns
(FromEventPattern<TEventArgs>(Action<EventHandler<TEventArgs>>, Action<EventHandler<TEventArgs>>),
and FromEventPattern(Action<EventHandler>, Action<EventHandler>)): add_handler adds a
handler and returns its token, remove_handler removes the handler of a token. The
subscriptions share one handler, added at the first subscription and removed when the last
one is disposed.
from_event_pattern_on
fn from_event_pattern_on<S: Clone + 'static, A: Clone + 'static, K: 'static>(add_handler: impl Fn(Rc<dyn Fn(S, A) -> ()>) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<EventPattern<S, A>>>
from_event_pattern, which adds and removes the handler on
scheduler (FromEventPattern<TEventArgs>(Action<EventHandler<TEventArgs>>, Action<EventHandler<TEventArgs>>, IScheduler)).
from_event_pattern_conversion
fn from_event_pattern_conversion<D: 'static, S: Clone + 'static, A: Clone + 'static, K: 'static>(conversion: impl Fn(Rc<dyn Fn(S, A) -> ()>) -> D + 'static, add_handler: impl Fn(D) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static) -> Rc<dyn IObservable<EventPattern<S, A>>>
The events of an event whose handlers are of the type D, which conversion makes from the
handler of a sender and arguments, as EventPatterns
(FromEventPattern<TDelegate, TEventArgs>(Func<EventHandler<TEventArgs>, TDelegate>, Action<TDelegate>, Action<TDelegate>)).
from_event_pattern_conversion_on
fn from_event_pattern_conversion_on<D: 'static, S: Clone + 'static, A: Clone + 'static, K: 'static>(conversion: impl Fn(Rc<dyn Fn(S, A) -> ()>) -> D + 'static, add_handler: impl Fn(D) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<EventPattern<S, A>>>
from_event_pattern_conversion on scheduler
(FromEventPattern<TDelegate, TEventArgs>(Func<EventHandler<TEventArgs>, TDelegate>, Action<TDelegate>, Action<TDelegate>, IScheduler)).
try_from_event_pattern_conversion
fn try_from_event_pattern_conversion<D: 'static, S: Clone + 'static, A: Clone + 'static, K: 'static>(conversion: impl Fn(Rc<dyn Fn(S, A) -> ()>) -> Result<D, ObservableError> + 'static, add_handler: impl Fn(D) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static) -> Rc<dyn IObservable<EventPattern<S, A>>>
from_event_pattern_conversion with a conversion
that may fail; a failure ends the subscription with its error (a conversion that throws).
try_from_event_pattern_conversion_on
fn try_from_event_pattern_conversion_on<D: 'static, S: Clone + 'static, A: Clone + 'static, K: 'static>(conversion: impl Fn(Rc<dyn Fn(S, A) -> ()>) -> Result<D, ObservableError> + 'static, add_handler: impl Fn(D) -> K + 'static, remove_handler: impl Fn(K) -> () + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<EventPattern<S, A>>>
try_from_event_pattern_conversion on
scheduler.
fork_join_all
fn fork_join_all<T: 'static, I>(sources: I) -> Rc<dyn IObservable<Vec<T>>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static
The last values of sources, in their order, once all of them have completed; a source that
completes without a value completes the result without one, and the first error ends it
(ForkJoin<TSource>(params IObservable<TSource>[]), ForkJoin<TSource>(IEnumerable<IObservable<TSource>>)).
Each subscription takes the sources of sources anew.
zip_all
fn zip_all<T: 'static, I>(sources: I) -> Rc<dyn IObservable<Vec<T>>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static
The lists of the values of the sequences of an enumerable, by position: the n-th list holds
the n-th value of each sequence (Zip(IEnumerable<IObservable<TSource>>) and
Zip(params IObservable<TSource>[])). Each subscription enumerates sources anew.
zip_all_with
fn zip_all_with<T: 'static, R: 'static, I>(sources: I, result_selector: impl Fn(Vec<T>) -> R + 'static) -> Rc<dyn IObservable<R>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static
zip_all with each list projected by result_selector
(Zip(IEnumerable<IObservable<TSource>>, Func<IList<TSource>, TResult>)).
try_zip_all_with
fn try_zip_all_with<T: 'static, R: 'static, I>(sources: I, result_selector: impl Fn(Vec<T>) -> Result<R, ObservableError> + 'static) -> Rc<dyn IObservable<R>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static
zip_all_with with a selector that may fail; a failure ends the
sequence with its error (Zip(IEnumerable<IObservable<TSource>>, Func<IList<TSource>, TResult>)
with a selector that throws).
combine_latest_all
fn combine_latest_all<T: Clone + 'static, I>(sources: I) -> Rc<dyn IObservable<Vec<T>>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static
The lists of the latest values of sources, whenever any of them produces a value, once each
has one; a source that ends keeps its last value until all have ended
(CombineLatest(IEnumerable<IObservable<TSource>>) and
CombineLatest(params IObservable<TSource>[])). No sources: the sequence never notifies.
combine_latest_all_with
fn combine_latest_all_with<T: 'static, R: 'static, I>(sources: I, result_selector: impl Fn(&[T]) -> R + 'static) -> Rc<dyn IObservable<R>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static
combine_latest_all with result_selector applied to the latest
values (CombineLatest(IEnumerable<IObservable<TSource>>, Func<IList<TSource>, TResult>)).
try_combine_latest_all_with
fn try_combine_latest_all_with<T: 'static, R: 'static, I>(sources: I, result_selector: impl Fn(&[T]) -> Result<R, ObservableError> + 'static) -> Rc<dyn IObservable<R>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static
combine_latest_all_with with a selector that may fail; a
failure ends the sequence with its error (CombineLatest of a list with a selector that
throws).
merge_all
fn merge_all<T: 'static, I>(sources: I) -> Rc<dyn IObservable<T>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static,
<I as >::IntoIter: 'static
Merges the values of the sequences of an enumerable, enumerated on the immediate scheduler
(Merge(IEnumerable<IObservable<TSource>>) and Merge(params IObservable<TSource>[])). Each
subscription enumerates sources anew.
merge_all_on
fn merge_all_on<T: 'static, I>(sources: I, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static,
<I as >::IntoIter: 'static
merge_all enumerating on scheduler
(Merge(IEnumerable<IObservable<TSource>>, IScheduler) and
Merge(IScheduler, params IObservable<TSource>[])).
merge_all_max
fn merge_all_max<T: 'static, I>(sources: I, max_concurrent: usize) -> Rc<dyn IObservable<T>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static,
<I as >::IntoIter: 'static
Merges the values of the sequences of an enumerable with at most max_concurrent inner
subscriptions at a time (Merge(IEnumerable<IObservable<TSource>>, int)). Panics when
max_concurrent is zero.
merge_all_max_on
fn merge_all_max_on<T: 'static, I>(sources: I, max_concurrent: usize, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static,
<I as >::IntoIter: 'static
merge_all_max enumerating on scheduler
(Merge(IEnumerable<IObservable<TSource>>, int, IScheduler)).
concat_all
fn concat_all<T: 'static, I>(sources: I) -> Rc<dyn IObservable<T>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static,
<I as >::IntoIter: 'static
The values of the sequences of an enumerable, one sequence after another
(Concat(IEnumerable<IObservable<TSource>>) and Concat(params IObservable<TSource>[])).
Each subscription enumerates sources anew, as each sequence ends.
amb_all
fn amb_all<T: 'static, I>(sources: I) -> Rc<dyn IObservable<T>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static
The sequence of an enumerable that notifies first; the subscriptions to the others are
disposed (Amb(IEnumerable<IObservable<TSource>>) and Amb(params IObservable<TSource>[])).
No sequence ends at once; one sequence is the sequence itself.
defer
fn defer<T: 'static>(factory: impl Fn() -> Rc<dyn IObservable<T>> + 'static) -> Rc<dyn IObservable<T>>
A sequence that calls factory on each subscription and subscribes to the sequence it
returns (Defer<TResult>(Func<IObservable<TResult>>)).
try_defer
fn try_defer<T: 'static>(factory: impl Fn() -> Result<Rc<dyn IObservable<T>>, ObservableError> + 'static) -> Rc<dyn IObservable<T>>
defer with a factory that may fail; a failure ends the sequence with its
error (Defer<TResult>(Func<IObservable<TResult>>) with a factory that throws).
range
fn range(start: i32, count: usize) -> Rc<dyn IObservable<i32>>
The count integers from start, on the scheduler of iteration, the current-thread one
(Range(int, int)). Panics when the last one is beyond i32::MAX, where upstream throws
ArgumentOutOfRangeException.
range_on
fn range_on(start: i32, count: usize, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<i32>>
The count integers from start, each notified by work of its own on scheduler
(Range(int, int, IScheduler)). Panics when the last one is beyond i32::MAX, where
upstream throws ArgumentOutOfRangeException.
repeat
fn repeat<T: Clone + 'static>(value: T) -> Rc<dyn IObservable<T>>
The value, forever, on the scheduler of iteration, the current-thread one
(Repeat<TResult>(TResult)).
repeat_on
fn repeat_on<T: Clone + 'static>(value: T, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
The value, forever, each time by work of its own on scheduler
(Repeat<TResult>(TResult, IScheduler)).
repeat_count
fn repeat_count<T: Clone + 'static>(value: T, repeat_count: usize) -> Rc<dyn IObservable<T>>
The value, repeat_count times, on the scheduler of iteration, the current-thread one
(Repeat<TResult>(TResult, int)).
repeat_count_on
fn repeat_count_on<T: Clone + 'static>(value: T, repeat_count: usize, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
The value, repeat_count times, each time by work of its own on scheduler
(Repeat<TResult>(TResult, int, IScheduler)).
generate
fn generate<S: Clone + 'static, R: 'static>(initial_state: S, condition: impl Fn(&S) -> bool + 'static, iterate: impl Fn(S) -> S + 'static, result_selector: impl Fn(&S) -> R + 'static) -> Rc<dyn IObservable<R>>
The values of a loop of states: from initial_state, while condition holds for the state,
the value result_selector gives for it, then the next state iterate gives; on the
scheduler of iteration, the current-thread one
(Generate<TState, TResult>(TState, Func<TState, bool>, Func<TState, TState>, Func<TState, TResult>)).
generate_on
fn generate_on<S: Clone + 'static, R: 'static>(initial_state: S, condition: impl Fn(&S) -> bool + 'static, iterate: impl Fn(S) -> S + 'static, result_selector: impl Fn(&S) -> R + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<R>>
generate, each value notified by work of its own on scheduler
(Generate<TState, TResult>(TState, Func<TState, bool>, Func<TState, TState>, Func<TState, TResult>, IScheduler)).
try_generate
fn try_generate<S: Clone + 'static, R: 'static>(initial_state: S, condition: impl Fn(&S) -> Result<bool, ObservableError> + 'static, iterate: impl Fn(S) -> Result<S, ObservableError> + 'static, result_selector: impl Fn(&S) -> Result<R, ObservableError> + 'static) -> Rc<dyn IObservable<R>>
generate with functions that may fail; a failure ends the sequence with
its error (Generate with functions that throw).
try_generate_on
fn try_generate_on<S: Clone + 'static, R: 'static>(initial_state: S, condition: impl Fn(&S) -> Result<bool, ObservableError> + 'static, iterate: impl Fn(S) -> Result<S, ObservableError> + 'static, result_selector: impl Fn(&S) -> Result<R, ObservableError> + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<R>>
generate_on with functions that may fail; a failure ends the sequence
with its error (Generate with functions that throw).
generate_after
fn generate_after<S: Clone + 'static, R: 'static>(initial_state: S, condition: impl Fn(&S) -> bool + 'static, iterate: impl Fn(S) -> S + 'static, result_selector: impl Fn(&S) -> R + 'static, time_selector: impl Fn(&S) -> Duration + 'static) -> Rc<dyn IObservable<R>>
generate, each value notified after the time time_selector gives for
its state, on the scheduler of time-based operations
(Generate<TState, TResult>(TState, Func<TState, bool>, Func<TState, TState>, Func<TState, TResult>, Func<TState, TimeSpan>)).
generate_after_on
fn generate_after_on<S: Clone + 'static, R: 'static>(initial_state: S, condition: impl Fn(&S) -> bool + 'static, iterate: impl Fn(S) -> S + 'static, result_selector: impl Fn(&S) -> R + 'static, time_selector: impl Fn(&S) -> Duration + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<R>>
generate_after on scheduler
(Generate<TState, TResult>(TState, Func<TState, bool>, Func<TState, TState>, Func<TState, TResult>, Func<TState, TimeSpan>, IScheduler)).
try_generate_after
fn try_generate_after<S: Clone + 'static, R: 'static>(initial_state: S, condition: impl Fn(&S) -> Result<bool, ObservableError> + 'static, iterate: impl Fn(S) -> Result<S, ObservableError> + 'static, result_selector: impl Fn(&S) -> Result<R, ObservableError> + 'static, time_selector: impl Fn(&S) -> Result<Duration, ObservableError> + 'static) -> Rc<dyn IObservable<R>>
generate_after with functions that may fail; a failure ends the
sequence with its error (Generate with a TimeSpan selector and functions that throw).
try_generate_after_on
fn try_generate_after_on<S: Clone + 'static, R: 'static>(initial_state: S, condition: impl Fn(&S) -> Result<bool, ObservableError> + 'static, iterate: impl Fn(S) -> Result<S, ObservableError> + 'static, result_selector: impl Fn(&S) -> Result<R, ObservableError> + 'static, time_selector: impl Fn(&S) -> Result<Duration, ObservableError> + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<R>>
generate_after_on with functions that may fail; a failure ends
the sequence with its error (Generate with a TimeSpan selector and functions that throw).
generate_at
fn generate_at<S: Clone + 'static, R: 'static>(initial_state: S, condition: impl Fn(&S) -> bool + 'static, iterate: impl Fn(S) -> S + 'static, result_selector: impl Fn(&S) -> R + 'static, time_selector: impl Fn(&S) -> SystemTime + 'static) -> Rc<dyn IObservable<R>>
generate, each value notified at the time time_selector gives for its
state, on the scheduler of time-based operations
(Generate<TState, TResult>(TState, Func<TState, bool>, Func<TState, TState>, Func<TState, TResult>, Func<TState, DateTimeOffset>)).
generate_at_on
fn generate_at_on<S: Clone + 'static, R: 'static>(initial_state: S, condition: impl Fn(&S) -> bool + 'static, iterate: impl Fn(S) -> S + 'static, result_selector: impl Fn(&S) -> R + 'static, time_selector: impl Fn(&S) -> SystemTime + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<R>>
generate_at on scheduler
(Generate<TState, TResult>(TState, Func<TState, bool>, Func<TState, TState>, Func<TState, TResult>, Func<TState, DateTimeOffset>, IScheduler)).
try_generate_at
fn try_generate_at<S: Clone + 'static, R: 'static>(initial_state: S, condition: impl Fn(&S) -> Result<bool, ObservableError> + 'static, iterate: impl Fn(S) -> Result<S, ObservableError> + 'static, result_selector: impl Fn(&S) -> Result<R, ObservableError> + 'static, time_selector: impl Fn(&S) -> Result<SystemTime, ObservableError> + 'static) -> Rc<dyn IObservable<R>>
generate_at with functions that may fail; a failure ends the sequence
with its error (Generate with a DateTimeOffset selector and functions that throw).
try_generate_at_on
fn try_generate_at_on<S: Clone + 'static, R: 'static>(initial_state: S, condition: impl Fn(&S) -> Result<bool, ObservableError> + 'static, iterate: impl Fn(S) -> Result<S, ObservableError> + 'static, result_selector: impl Fn(&S) -> Result<R, ObservableError> + 'static, time_selector: impl Fn(&S) -> Result<SystemTime, ObservableError> + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<R>>
generate_at_on with functions that may fail; a failure ends the
sequence with its error (Generate with a DateTimeOffset selector and functions that
throw).
using
fn using<T: 'static, R: IDisposable + ?Sized + 'static>(resource_factory: impl Fn() -> Rc<R> + 'static, observable_factory: impl Fn(Rc<R>) -> Rc<dyn IObservable<T>> + 'static) -> Rc<dyn IObservable<T>>
A sequence that, on each subscription, creates a resource with resource_factory,
subscribes to the sequence observable_factory makes from it, and disposes the resource
when the subscription ends
(Using<TResult, TResource>(Func<TResource>, Func<TResource, IObservable<TResult>>)).
try_using
fn try_using<T: 'static, R: IDisposable + ?Sized + 'static>(resource_factory: impl Fn() -> Result<Rc<R>, ObservableError> + 'static, observable_factory: impl Fn(Rc<R>) -> Result<Rc<dyn IObservable<T>>, ObservableError> + 'static) -> Rc<dyn IObservable<T>>
using with factories that may fail; a failure ends the sequence with its
error, after disposing the resource if it was created (Using with factories that throw).
start
fn start<T: Clone + 'static>(function: impl FnOnce() -> T + 'static) -> Rc<dyn IObservable<T>>
Runs function on the scheduler of asynchronous conversions and notifies its result, to
every observer, when it has run (Start<TResult>(Func<TResult>)).
start_on
fn start_on<T: Clone + 'static>(function: impl FnOnce() -> T + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
Runs function on scheduler and notifies its result, to every observer, when it has run
(Start<TResult>(Func<TResult>, IScheduler)).
try_start
fn try_start<T: Clone + 'static>(function: impl FnOnce() -> Result<T, ObservableError> + 'static) -> Rc<dyn IObservable<T>>
start with a function that may fail; a failure is notified as the error of
the sequence (Start<TResult>(Func<TResult>) with a function that throws).
try_start_on
fn try_start_on<T: Clone + 'static>(function: impl FnOnce() -> Result<T, ObservableError> + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
start_on with a function that may fail; a failure is notified as the
error of the sequence (Start<TResult>(Func<TResult>, IScheduler) with a function that
throws).
start_action
fn start_action(action: impl FnOnce() -> () + 'static) -> Rc<dyn IObservable<()>>
Runs action on the scheduler of asynchronous conversions and notifies a unit value, to
every observer, when it has run (Start(Action)).
start_action_on
fn start_action_on(action: impl FnOnce() -> () + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<()>>
Runs action on scheduler and notifies a unit value, to every observer, when it has run
(Start(Action, IScheduler)).
try_start_action
fn try_start_action(action: impl FnOnce() -> Result<(), ObservableError> + 'static) -> Rc<dyn IObservable<()>>
start_action with an action that may fail; a failure is notified as
the error of the sequence (Start(Action) with an action that throws).
try_start_action_on
fn try_start_action_on(action: impl FnOnce() -> Result<(), ObservableError> + 'static, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<()>>
start_action_on with an action that may fail; a failure is
notified as the error of the sequence (Start(Action, IScheduler) with an action that
throws).
to_observable
fn to_observable<I>(source: I) -> Rc<dyn IObservable<<I as >::Item>>
where I: IntoIterator + Clone + 'static,
<I as >::Item: 'static
The values of source, on the scheduler of iteration, the current-thread one
(ToObservable<TSource>(IEnumerable<TSource>)). Each subscription iterates a clone of
source.
to_observable_on
fn to_observable_on<I>(source: I, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<<I as >::Item>>
where I: IntoIterator + Clone + 'static,
<I as >::Item: 'static
The values of source, each notified by work of its own on scheduler
(ToObservable<TSource>(IEnumerable<TSource>, IScheduler)).
try_to_observable
fn try_to_observable<I, T>(source: I) -> Rc<dyn IObservable<T>>
where I: IntoIterator<Item = Result<T, ObservableError>> + Clone + 'static,
T: 'static
to_observable of a sequence whose iteration may fail: an error
ends the sequence with it (ToObservable of an enumerable whose MoveNext throws).
try_to_observable_on
fn try_to_observable_on<I, T>(source: I, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
where I: IntoIterator<Item = Result<T, ObservableError>> + Clone + 'static,
T: 'static
to_observable_on of a sequence whose iteration may fail: an
error ends the sequence with it (ToObservable of an enumerable whose MoveNext throws).
subscribe_enumerable
fn subscribe_enumerable<I>(source: I, observer: Rc<dyn IObserver<<I as >::Item>>) -> Rc<dyn IDisposable>
where I: IntoIterator + Clone + 'static,
<I as >::Item: 'static
Notifies the values of source to observer, on the scheduler of iteration, the
current-thread one (Subscribe<TSource>(IEnumerable<TSource>, IObserver<TSource>)).
subscribe_enumerable_on
fn subscribe_enumerable_on<I>(source: I, observer: Rc<dyn IObserver<<I as >::Item>>, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IDisposable>
where I: IntoIterator + Clone + 'static,
<I as >::Item: 'static
Notifies the values of source to observer, each by work of its own on scheduler
(Subscribe<TSource>(IEnumerable<TSource>, IObserver<TSource>, IScheduler)).
timer
fn timer(due_time: Duration) -> Rc<dyn IObservable<i64>>
Zero after due_time, then the end, on the scheduler of time-based operations
(Timer(TimeSpan)).
timer_at
fn timer_at(due_time: SystemTime) -> Rc<dyn IObservable<i64>>
Zero at due_time, then the end, on the scheduler of time-based operations
(Timer(DateTimeOffset)).
timer_periodic
fn timer_periodic(due_time: Duration, period: Duration) -> Rc<dyn IObservable<i64>>
Zero after due_time, then the following integers every period, on the scheduler of
time-based operations (Timer(TimeSpan, TimeSpan)).
timer_at_periodic
fn timer_at_periodic(due_time: SystemTime, period: Duration) -> Rc<dyn IObservable<i64>>
Zero at due_time, then the following integers every period, on the scheduler of
time-based operations (Timer(DateTimeOffset, TimeSpan)).
timer_on
fn timer_on(due_time: Duration, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<i64>>
Zero after due_time, then the end, on scheduler (Timer(TimeSpan, IScheduler)).
timer_at_on
fn timer_at_on(due_time: SystemTime, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<i64>>
Zero at due_time, then the end, on scheduler (Timer(DateTimeOffset, IScheduler)).
timer_periodic_on
fn timer_periodic_on(due_time: Duration, period: Duration, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<i64>>
Zero after due_time, then the following integers every period, on scheduler
(Timer(TimeSpan, TimeSpan, IScheduler)).
timer_at_periodic_on
fn timer_at_periodic_on(due_time: SystemTime, period: Duration, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<i64>>
Zero at due_time, then the following integers every period, on scheduler
(Timer(DateTimeOffset, TimeSpan, IScheduler)).
interval
fn interval(period: Duration) -> Rc<dyn IObservable<i64>>
The integers from zero, one every period, on the scheduler of time-based operations
(Interval(TimeSpan)).
interval_on
fn interval_on(period: Duration, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<i64>>
The integers from zero, one every period, through the periodic scheduling of scheduler
(Interval(TimeSpan, IScheduler)).
catch_all
fn catch_all<T: 'static, I>(sources: I) -> Rc<dyn IObservable<T>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static,
<I as >::IntoIter: 'static
Continues with the next of sources when one fails; the last error ends the sequence when
all of them fail (Catch(IEnumerable<IObservable<TSource>>), Catch(params IObservable<TSource>[])). The sources are enumerated again for each subscription.
try_catch_all
fn try_catch_all<T: 'static, I>(sources: impl Fn() -> Result<I, ObservableError> + 'static) -> Rc<dyn IObservable<T>>
where I: IntoIterator<Item = Result<Rc<dyn IObservable<T>>, ObservableError>>,
<I as >::IntoIter: 'static
catch_all over sources whose enumeration may fail: sources starts an
enumeration (GetEnumerator, which fails with an Err), and each item is the next source
or the error of the step (MoveNext that throws). A failure ends the sequence with its
error.
on_error_resume_next_all
fn on_error_resume_next_all<T: 'static, I>(sources: I) -> Rc<dyn IObservable<T>>
where I: IntoIterator<Item = Rc<dyn IObservable<T>>> + Clone + 'static,
<I as >::IntoIter: 'static
Each of sources in turn, whether it fails or completes; the sequence completes after the
last one (OnErrorResumeNext(IEnumerable<IObservable<TSource>>), OnErrorResumeNext(params IObservable<TSource>[])). The sources are enumerated again for each subscription.
try_on_error_resume_next_all
fn try_on_error_resume_next_all<T: 'static, I>(sources: impl Fn() -> Result<I, ObservableError> + 'static) -> Rc<dyn IObservable<T>>
where I: IntoIterator<Item = Result<Rc<dyn IObservable<T>>, ObservableError>>,
<I as >::IntoIter: 'static
on_error_resume_next_all over sources whose enumeration
may fail: sources starts an enumeration (GetEnumerator, which fails with an Err), and
each item is the next source or the error of the step (MoveNext that throws). A failure
ends the sequence with its error.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<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.