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>

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.