pub struct HashMapSubscription<K, V, Codec = Default> { /* private fields */ }
Expand description

Observable hash map subscription.

This can be sent to a remote endpoint via a remote channel. Then, on the remote endpoint, mirror can be used to build and keep up-to-date a mirror of the observed hash map.

The event stream can also be processed event-wise using recv. If the subscription is not incremental take_initial must be called before the first call to recv.

Implementations

Returns whether the subscription is incremental.

Returns whether the initial value event or stream of events that build up the initial value has completed or take_initial has been called.

Returns whether the observed hash map has indicated that no further change events will occur.

Take the initial value.

This is only possible if the subscription is not incremental and the initial value has not already been taken. Otherwise None is returned.

If the subscription is not incremental this must be called before the first call to recv.

Receives the next change event.

Panics

Panics when the subscription is not incremental and take_initial has not been called.

Mirror the hash map that this subscription is observing.

max_size specifies the maximum allowed size of the mirrored collection. If this size is reached, processing of events is stopped and RecvError::MaxSizeExceeded is returned.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more