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

A hash map that is mirroring an observable hash map.

Implementations

Returns a reference to the current value of the hash map.

Updates are paused while the read lock is held.

This method returns an error if the observed hash map has been dropped or the connection to it failed before it was marked as done by calling ObservableHashMap::done. In this case the mirrored contents at the point of loss of connection can be obtained using detach.

Returns a reference to the current value of the hash map and marks it as seen.

Thus changed will not return immediately until the value changes after this method returns.

Updates are paused while the read lock is held.

This method returns an error if the observed hash map has been dropped or the connection to it failed before it was marked as done by calling ObservableHashMap::done. In this case the mirrored contents at the point of loss of connection can be obtained using detach.

Stops updating the hash map and returns its current contents.

Waits for a change and marks the newest value as seen.

This also returns when connection to the observed hash map has been lost or the hash map has been marked as done.

Subscribes to change events from this mirrored hash map.

The current contents of the hash map is included with the subscription.

buffer specifies the maximum size of the event buffer for this subscription in number of events. If it is exceeded the subscription is shed and the receiver gets a RecvError::Lagged.

Subscribes to change events from this mirrored hash map with incremental sending of the current contents.

The current contents of the hash map are sent incrementally.

buffer specifies the maximum size of the event buffer for this subscription in number of events. If it is exceeded the subscription is shed and the receiver gets a RecvError::Lagged.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. 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