pub type Progressable<D> = ObservableField<D, SubStore<D>>;Expand description
ObservableField that allows to subscribe to all changes
(ObservableField::subscribe) and to concrete changes
(ObservableField::when and ObservableField::when_eq).
Can recognise when all updates was processed by subscribers.
Aliased Type§
pub struct Progressable<D> { /* private fields */ }Implementations§
Source§impl<D: 'static> Progressable<D>
impl<D: 'static> Progressable<D>
Sourcepub fn new(data: D) -> Self
pub fn new(data: D) -> Self
Returns new ObservableField with subscribable mutations.
Also, you can wait for all updates processing by awaiting on
ObservableField::when_all_processed().
Source§impl<D> Progressable<D>where
D: Clone + 'static,
impl<D> Progressable<D>where
D: Clone + 'static,
Sourcepub fn subscribe(&self) -> LocalBoxStream<'static, Guarded<D>>
pub fn subscribe(&self) -> LocalBoxStream<'static, Guarded<D>>
Returns Stream into which underlying data updates (wrapped in the
progressable::Guarded) will be emitted.
Sourcepub fn when_all_processed(&self) -> Processed<'static> ⓘ
pub fn when_all_processed(&self) -> Processed<'static> ⓘ
Returns Future resolving when all data updates will be processed by
subscribers.