Crate medea_reactive
source ·Expand description
medea-reactive
Reactive mutable data containers.
License
Copyright © 2021-2023 Instrumentisto Team, https://github.com/instrumentisto
This software is subject to the terms of the Blue Oak Model License 1.0.0. If a copy of the BlueOak-1.0.0 license was not distributed with this file, You can obtain one at https://blueoakcouncil.org/license/1.0.0.
Modules
- Implementations of reactive collections based on
std::collections
. - Implementations of basic reactive containers.
- Stores for updates subscribers.
Structs
Future
returned bywhen_all_processed()
function.- Error that is sent to all subscribers when this
ObservableField
/ObservableCell
is dropped. - Guard backed by a counter incrementing on its creation and decrementing on
Drop
ping. - Wrapper around a data
T
decrementing its underlying counter onDrop
. - Mutable
ObservableField
reference returned byObservableField::borrow_mut
. - Observable analogue of
Cell
. - Reactive cell which emits all modifications to its subscribers.
- Reactive
Cell
with a progress tracking.
Enums
Traits
- Abstraction over catching all unique modifications of an
ObservableField
. - Abstraction over
ObservableField::when
andObservableField::when_eq
implementations for custom types.
Functions
Type Definitions
ObservableField
that allows to subscribe to all changes (ObservableField::subscribe
) and to concrete changes (ObservableField::when
andObservableField::when_eq
).- Reactive hash map based on
HashMap
. - Reactive hash set based on
HashSet
. - Reactive vector based on
Vec
. ObservableField
that allows to subscribe to all changes (ObservableField::subscribe
) and to concrete changes (ObservableField::when
andObservableField::when_eq
).- Reactive hash map based on
HashMap
with additional functionality of tracking progress made by its subscribers. ItsHashMap::on_insert()
andHashMap::on_remove()
subscriptions return values wrapped inprogressable::Guarded
, and implementation tracks allprogressable::Guard
s. - Reactive hash set based on
HashSet
with an ability to recognize when all updates was processed by subscribers. - Reactive vector based on
Vec
with additional functionality of tracking progress made by its subscribers. ItsVec::on_push()
andVec::on_remove()
subscriptions return values wrapped in aprogressable::Guarded
, and the implementation tracks allprogressable::Guard
s.