pub struct ObservableChangeSet;Expand description
The factories of sequences of change sets (ObservableChangeSet).
Implementations§
Source§impl ObservableChangeSet
impl ObservableChangeSet
Sourcepub fn create_cache<T: Clone + 'static, K: Eq + Hash + Clone + 'static>(
subscribe: impl Fn(SourceCache<T, K>) -> Rc<dyn IDisposable> + 'static,
key_selector: impl Fn(&T) -> K + 'static,
) -> Rc<dyn IObservable<ChangeSet<T, K>>>
pub fn create_cache<T: Clone + 'static, K: Eq + Hash + Clone + 'static>( subscribe: impl Fn(SourceCache<T, K>) -> Rc<dyn IDisposable> + 'static, key_selector: impl Fn(&T) -> K + 'static, ) -> Rc<dyn IObservable<ChangeSet<T, K>>>
A sequence of the change sets of a cache that subscribe fills; the disposable it returns
is disposed with the subscription
(Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, IDisposable>, Func<TObject, TKey>)).
Sourcepub fn try_create_cache<T: Clone + 'static, K: Eq + Hash + Clone + 'static>(
subscribe: impl Fn(SourceCache<T, K>) -> Result<Rc<dyn IDisposable>, ObservableError> + 'static,
key_selector: impl Fn(&T) -> K + 'static,
) -> Rc<dyn IObservable<ChangeSet<T, K>>>
pub fn try_create_cache<T: Clone + 'static, K: Eq + Hash + Clone + 'static>( subscribe: impl Fn(SourceCache<T, K>) -> Result<Rc<dyn IDisposable>, ObservableError> + 'static, key_selector: impl Fn(&T) -> K + 'static, ) -> Rc<dyn IObservable<ChangeSet<T, K>>>
create_cache with a function that can fail: its error ends the
sequence (the exception that upstream catches and delivers with OnError).
Sourcepub fn create_cache_with_action<T: Clone + 'static, K: Eq + Hash + Clone + 'static, A: FnOnce() + 'static>(
subscribe: impl Fn(SourceCache<T, K>) -> A + 'static,
key_selector: impl Fn(&T) -> K + 'static,
) -> Rc<dyn IObservable<ChangeSet<T, K>>>
pub fn create_cache_with_action<T: Clone + 'static, K: Eq + Hash + Clone + 'static, A: FnOnce() + 'static>( subscribe: impl Fn(SourceCache<T, K>) -> A + 'static, key_selector: impl Fn(&T) -> K + 'static, ) -> Rc<dyn IObservable<ChangeSet<T, K>>>
A sequence of the change sets of a cache that subscribe fills; the action it returns runs
when the subscription is disposed
(Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, Action>, Func<TObject, TKey>)).
Sourcepub fn try_create_cache_with_action<T: Clone + 'static, K: Eq + Hash + Clone + 'static, A: FnOnce() + 'static>(
subscribe: impl Fn(SourceCache<T, K>) -> Result<A, ObservableError> + 'static,
key_selector: impl Fn(&T) -> K + 'static,
) -> Rc<dyn IObservable<ChangeSet<T, K>>>
pub fn try_create_cache_with_action<T: Clone + 'static, K: Eq + Hash + Clone + 'static, A: FnOnce() + 'static>( subscribe: impl Fn(SourceCache<T, K>) -> Result<A, ObservableError> + 'static, key_selector: impl Fn(&T) -> K + 'static, ) -> Rc<dyn IObservable<ChangeSet<T, K>>>
create_cache_with_action with a function that can fail:
its error ends the sequence.
Sourcepub fn create_cache_async_with_disposable_with_token<T: Clone + 'static, K: Eq + Hash + Clone + 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>(
subscribe: impl Fn(SourceCache<T, K>, CancellationToken) -> Fut + 'static,
key_selector: impl Fn(&T) -> K + 'static,
) -> Rc<dyn IObservable<ChangeSet<T, K>>>
pub fn create_cache_async_with_disposable_with_token<T: Clone + 'static, K: Eq + Hash + Clone + 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>( subscribe: impl Fn(SourceCache<T, K>, CancellationToken) -> Fut + 'static, key_selector: impl Fn(&T) -> K + 'static, ) -> Rc<dyn IObservable<ChangeSet<T, K>>>
The asynchronous form whose task gives the disposable released with the subscription
(Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, CancellationToken, Task<IDisposable>>, Func<TObject, TKey>)): the change sets are delivered from the start,
and an error of the task ends the sequence.
Sourcepub fn create_cache_async_with_disposable<T: Clone + 'static, K: Eq + Hash + Clone + 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>(
subscribe: impl Fn(SourceCache<T, K>) -> Fut + 'static,
key_selector: impl Fn(&T) -> K + 'static,
) -> Rc<dyn IObservable<ChangeSet<T, K>>>
pub fn create_cache_async_with_disposable<T: Clone + 'static, K: Eq + Hash + Clone + 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>( subscribe: impl Fn(SourceCache<T, K>) -> Fut + 'static, key_selector: impl Fn(&T) -> K + 'static, ) -> Rc<dyn IObservable<ChangeSet<T, K>>>
create_cache_async_with_disposable_with_token
without a token (Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, Task<IDisposable>>, Func<TObject, TKey>)).
Sourcepub fn create_cache_async_with_action_with_token<T: Clone + 'static, K: Eq + Hash + Clone + 'static, A: FnOnce() + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>(
subscribe: impl Fn(SourceCache<T, K>, CancellationToken) -> Fut + 'static,
key_selector: impl Fn(&T) -> K + 'static,
) -> Rc<dyn IObservable<ChangeSet<T, K>>>
pub fn create_cache_async_with_action_with_token<T: Clone + 'static, K: Eq + Hash + Clone + 'static, A: FnOnce() + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>( subscribe: impl Fn(SourceCache<T, K>, CancellationToken) -> Fut + 'static, key_selector: impl Fn(&T) -> K + 'static, ) -> Rc<dyn IObservable<ChangeSet<T, K>>>
The asynchronous form whose task gives the action run with the release of the subscription
(Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, CancellationToken, Task<Action>>, Func<TObject, TKey>)): disposing the subscription completes the sequence, then runs the
action.
Sourcepub fn create_cache_async_with_action<T: Clone + 'static, K: Eq + Hash + Clone + 'static, A: FnOnce() + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>(
subscribe: impl Fn(SourceCache<T, K>) -> Fut + 'static,
key_selector: impl Fn(&T) -> K + 'static,
) -> Rc<dyn IObservable<ChangeSet<T, K>>>
pub fn create_cache_async_with_action<T: Clone + 'static, K: Eq + Hash + Clone + 'static, A: FnOnce() + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>( subscribe: impl Fn(SourceCache<T, K>) -> Fut + 'static, key_selector: impl Fn(&T) -> K + 'static, ) -> Rc<dyn IObservable<ChangeSet<T, K>>>
create_cache_async_with_action_with_token
without a token (Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, Task<Action>>, Func<TObject, TKey>)).
Sourcepub fn create_cache_async_with_token<T: Clone + 'static, K: Eq + Hash + Clone + 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>(
subscribe: impl Fn(SourceCache<T, K>, CancellationToken) -> Fut + 'static,
key_selector: impl Fn(&T) -> K + 'static,
) -> Rc<dyn IObservable<ChangeSet<T, K>>>
pub fn create_cache_async_with_token<T: Clone + 'static, K: Eq + Hash + Clone + 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>( subscribe: impl Fn(SourceCache<T, K>, CancellationToken) -> Fut + 'static, key_selector: impl Fn(&T) -> K + 'static, ) -> Rc<dyn IObservable<ChangeSet<T, K>>>
The asynchronous form whose task only fills the cache
(Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, CancellationToken, Task>, Func<TObject, TKey>)): disposing the subscription completes the sequence.
Sourcepub fn create_cache_async<T: Clone + 'static, K: Eq + Hash + Clone + 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>(
subscribe: impl Fn(SourceCache<T, K>) -> Fut + 'static,
key_selector: impl Fn(&T) -> K + 'static,
) -> Rc<dyn IObservable<ChangeSet<T, K>>>
pub fn create_cache_async<T: Clone + 'static, K: Eq + Hash + Clone + 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>( subscribe: impl Fn(SourceCache<T, K>) -> Fut + 'static, key_selector: impl Fn(&T) -> K + 'static, ) -> Rc<dyn IObservable<ChangeSet<T, K>>>
create_cache_async_with_token without a token
(Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, Task>, Func<TObject, TKey>)).
Sourcepub fn create_list<T: Clone + PartialEq + 'static>(
subscribe: impl Fn(SourceList<T>) -> Rc<dyn IDisposable> + 'static,
) -> Rc<dyn IObservable<ChangeSet<T>>>
pub fn create_list<T: Clone + PartialEq + 'static>( subscribe: impl Fn(SourceList<T>) -> Rc<dyn IDisposable> + 'static, ) -> Rc<dyn IObservable<ChangeSet<T>>>
A sequence of the change sets of a list that subscribe fills; the disposable it returns is
disposed with the subscription, after the sequence completes
(Create<T>(Func<ISourceList<T>, IDisposable>)).
Sourcepub fn try_create_list<T: Clone + PartialEq + 'static>(
subscribe: impl Fn(SourceList<T>) -> Result<Rc<dyn IDisposable>, ObservableError> + 'static,
) -> Rc<dyn IObservable<ChangeSet<T>>>
pub fn try_create_list<T: Clone + PartialEq + 'static>( subscribe: impl Fn(SourceList<T>) -> Result<Rc<dyn IDisposable>, ObservableError> + 'static, ) -> Rc<dyn IObservable<ChangeSet<T>>>
create_list with a function that can fail: its error ends the
sequence.
Sourcepub fn create_list_with_action<T: Clone + PartialEq + 'static, A: FnOnce() + 'static>(
subscribe: impl Fn(SourceList<T>) -> A + 'static,
) -> Rc<dyn IObservable<ChangeSet<T>>>
pub fn create_list_with_action<T: Clone + PartialEq + 'static, A: FnOnce() + 'static>( subscribe: impl Fn(SourceList<T>) -> A + 'static, ) -> Rc<dyn IObservable<ChangeSet<T>>>
A sequence of the change sets of a list that subscribe fills; the action it returns runs
when the subscription is disposed (Create<T>(Func<ISourceList<T>, Action>)).
Sourcepub fn try_create_list_with_action<T: Clone + PartialEq + 'static, A: FnOnce() + 'static>(
subscribe: impl Fn(SourceList<T>) -> Result<A, ObservableError> + 'static,
) -> Rc<dyn IObservable<ChangeSet<T>>>
pub fn try_create_list_with_action<T: Clone + PartialEq + 'static, A: FnOnce() + 'static>( subscribe: impl Fn(SourceList<T>) -> Result<A, ObservableError> + 'static, ) -> Rc<dyn IObservable<ChangeSet<T>>>
create_list_with_action with a function that can fail:
its error ends the sequence.
Sourcepub fn create_list_async_with_disposable_with_token<T: Clone + PartialEq + 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>(
subscribe: impl Fn(SourceList<T>, CancellationToken) -> Fut + 'static,
) -> Rc<dyn IObservable<ChangeSet<T>>>
pub fn create_list_async_with_disposable_with_token<T: Clone + PartialEq + 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>( subscribe: impl Fn(SourceList<T>, CancellationToken) -> Fut + 'static, ) -> Rc<dyn IObservable<ChangeSet<T>>>
The asynchronous form whose task gives the disposable released with the subscription
(Create<T>(Func<ISourceList<T>, CancellationToken, Task<IDisposable>>)).
Sourcepub fn create_list_async_with_disposable<T: Clone + PartialEq + 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>(
subscribe: impl Fn(SourceList<T>) -> Fut + 'static,
) -> Rc<dyn IObservable<ChangeSet<T>>>
pub fn create_list_async_with_disposable<T: Clone + PartialEq + 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>( subscribe: impl Fn(SourceList<T>) -> Fut + 'static, ) -> Rc<dyn IObservable<ChangeSet<T>>>
create_list_async_with_disposable_with_token
without a token (Create<T>(Func<ISourceList<T>, Task<IDisposable>>)).
Sourcepub fn create_list_async_with_action_with_token<T: Clone + PartialEq + 'static, A: FnOnce() + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>(
subscribe: impl Fn(SourceList<T>, CancellationToken) -> Fut + 'static,
) -> Rc<dyn IObservable<ChangeSet<T>>>
pub fn create_list_async_with_action_with_token<T: Clone + PartialEq + 'static, A: FnOnce() + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>( subscribe: impl Fn(SourceList<T>, CancellationToken) -> Fut + 'static, ) -> Rc<dyn IObservable<ChangeSet<T>>>
The asynchronous form whose task gives the action run with the release of the subscription
(Create<T>(Func<ISourceList<T>, CancellationToken, Task<Action>>)).
Sourcepub fn create_list_async_with_action<T: Clone + PartialEq + 'static, A: FnOnce() + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>(
subscribe: impl Fn(SourceList<T>) -> Fut + 'static,
) -> Rc<dyn IObservable<ChangeSet<T>>>
pub fn create_list_async_with_action<T: Clone + PartialEq + 'static, A: FnOnce() + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>( subscribe: impl Fn(SourceList<T>) -> Fut + 'static, ) -> Rc<dyn IObservable<ChangeSet<T>>>
create_list_async_with_action_with_token
without a token (Create<T>(Func<ISourceList<T>, Task<Action>>)).
Sourcepub fn create_list_async<T: Clone + PartialEq + 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>(
subscribe: impl Fn(SourceList<T>) -> Fut + 'static,
) -> Rc<dyn IObservable<ChangeSet<T>>>
pub fn create_list_async<T: Clone + PartialEq + 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>( subscribe: impl Fn(SourceList<T>) -> Fut + 'static, ) -> Rc<dyn IObservable<ChangeSet<T>>>
The asynchronous form whose task only fills the list
(Create<T>(Func<ISourceList<T>, Task>)): disposing the subscription completes the
sequence.
Sourcepub fn create_list_async_with_token<T: Clone + PartialEq + 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>(
subscribe: impl Fn(SourceList<T>, CancellationToken) -> Fut + 'static,
) -> Rc<dyn IObservable<ChangeSet<T>>>
pub fn create_list_async_with_token<T: Clone + PartialEq + 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>( subscribe: impl Fn(SourceList<T>, CancellationToken) -> Fut + 'static, ) -> Rc<dyn IObservable<ChangeSet<T>>>
The asynchronous form whose task only fills the list, with a token
(Create<T>(Func<ISourceList<T>, CancellationToken, Task>)): unlike the other forms, the
change sets are delivered once the task has ended, as upstream subscribes to the list after
awaiting it.