Crate medea_reactive[][src]

Reactive mutable data containers.

Modules

collections

Implementations of reactive collections based on std::collections.

field

Implementations of basic reactive containers.

subscribers_store

Stores for updates subscribers.

Structs

AllProcessed

Future returned by when_all_processed() function.

DroppedError

Error that is sent to all subscribers when this ObservableField / ObservableCell is dropped.

Guard

Guard backed by a counter incrementing on its creation and decrementing on Dropping.

Guarded

Wrapper around a data T decrementing its underlying counter on Drop.

MutObservableFieldGuard

Mutable ObservableField reference returned by ObservableField::borrow_mut.

ObservableCell

Observable analogue of Cell.

ObservableField

Reactive cell which emits all modifications to its subscribers.

Processed

Future with inner factory. Factory can be unwrapped using Into implementation.

ProgressableCell

Reactive Cell with a progress tracking.

Enums

UniversalSubscriber

Subscriber that implements subscribing and Whenable in Vec.

Traits

OnObservableFieldModification

Abstraction over catching all unique modifications of an ObservableField.

Whenable

Abstraction over ObservableField::when and ObservableField::when_eq implementations for custom types.

Functions

when_all_processed

Creates AllProcessed Future from the provided Iterator of Factorys.

Type Definitions

Observable

ObservableField that allows to subscribe to all changes (ObservableField::subscribe) and to concrete changes (ObservableField::when and ObservableField::when_eq).

ObservableHashMap

Reactive hash map based on HashMap.

ObservableHashSet

Reactive hash set based on HashSet.

ObservableVec

Reactive vector based on Vec.

Progressable

ObservableField that allows to subscribe to all changes (ObservableField::subscribe) and to concrete changes (ObservableField::when and ObservableField::when_eq).

ProgressableHashMap

Reactive hash map based on HashMap with additional functionality of tracking progress made by its subscribers. Its HashMap::on_insert() and HashMap::on_remove() subscriptions return values wrapped in progressable::Guarded, and implementation tracks all progressable::Guards.

ProgressableHashSet

Reactive hash set based on HashSet with an ability to recognize when all updates was processed by subscribers.

ProgressableVec

Reactive vector based on Vec with additional functionality of tracking progress made by its subscribers. Its Vec::on_push() and Vec::on_remove() subscriptions return values wrapped in a progressable::Guarded, and the implementation tracks all progressable::Guards.