Progressable

Type Alias 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.

Aliased Type§

pub struct Progressable<D> { /* private fields */ }

Implementations§

Source§

impl<D: 'static> Progressable<D>

Source

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,

Source

pub fn subscribe(&self) -> LocalBoxStream<'static, Guarded<D>>

Returns Stream into which underlying data updates (wrapped in the progressable::Guarded) will be emitted.

Source

pub fn when_all_processed(&self) -> Processed<'static>

Returns Future resolving when all data updates will be processed by subscribers.