robs
only.Expand description
Observable vector.
This provides a locally and remotely observable vector. The observable vector sends a change event each time a change is performed on it. The resulting event stream can either be processed event-wise or used to build a mirrored vector.
Changes are sent using a remote broadcast channel, thus subscribers cannot block the observed vector and are shed when their event buffer exceeds a configurable size.
§Alternatives
The observable append-only list is more memory-efficient as it does not require a send buffer for each subscriber. You should prefer it, if you are only appending to the vector.
§Basic use
Create a ObservableVec and obtain a subscription to it using ObservableVec::subscribe. Send this subscription to a remote endpoint via a remote channel and call VecSubscription::mirror on the remote endpoint to obtain a live mirror of the observed vector or process each change event individually using VecSubscription::recv.
Structs§
- A mutable iterator over the items in an observable vector.
- A vector that is mirroring an observable vector.
- A snapshot view of an observable vector.
- A vector that emits an event for each change.
- A mutable reference to a value inside an observable vector.
- Observable vector subscription.
Enums§
- A vector change event.