Type Definition medea_reactive::Progressable
source · 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.
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.