Module remoc::robs::list

source ·
Available on crate feature robs only.
Expand description

Observable append-only list.

This provides a locally and remotely observable append-only list. The observable list 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 list.

§Alternatives

The observable vector provides most operations of a vector, but allocates a separate event buffer per subscriber and thus uses more memory.

§Basic use

Create a ObservableList and obtain a subscription to it using ObservableList::subscribe. Send this subscription to a remote endpoint via a remote channel and call ListSubscription::mirror on the remote endpoint to obtain a live mirror of the observed vector or process each change event individually using ListSubscription::recv.

Structs§

Enums§