Struct remoc_obs::hashmap::HashMapSubscription
source · [−]pub struct HashMapSubscription<K, V, Codec = Default> {
pub initial: HashMap<K, V>,
pub events: Receiver<HashMapEvent<K, V>, Codec>,
}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.
You can also break apart this structure and use the event stream directly.
Fields
initial: HashMap<K, V>Value of hash map at time of subscription.
events: Receiver<HashMapEvent<K, V>, Codec>Change events receiver.
Implementations
impl<K, V, Codec> HashMapSubscription<K, V, Codec> where
K: RemoteSend + Eq + Hash + Clone + Sync,
V: RemoteSend + Clone + Sync,
Codec: Codec,
impl<K, V, Codec> HashMapSubscription<K, V, Codec> where
K: RemoteSend + Eq + Hash + Clone + Sync,
V: RemoteSend + Clone + Sync,
Codec: Codec,
Mirror the observed hash map that this subscription is receiving events from.
Trait Implementations
impl<'de, K, V, Codec> Deserialize<'de> for HashMapSubscription<K, V, Codec> where
K: RemoteSend + Eq + Hash,
V: RemoteSend,
Codec: Codec,
impl<'de, K, V, Codec> Deserialize<'de> for HashMapSubscription<K, V, Codec> where
K: RemoteSend + Eq + Hash,
V: RemoteSend,
Codec: Codec,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<K, V, Codec> Serialize for HashMapSubscription<K, V, Codec> where
K: RemoteSend + Eq + Hash,
V: RemoteSend,
Codec: Codec,
impl<K, V, Codec> Serialize for HashMapSubscription<K, V, Codec> where
K: RemoteSend + Eq + Hash,
V: RemoteSend,
Codec: Codec,
Auto Trait Implementations
impl<K, V, Codec = Default> !RefUnwindSafe for HashMapSubscription<K, V, Codec>
impl<K, V, Codec> Send for HashMapSubscription<K, V, Codec> where
Codec: Send,
K: Send,
V: Send,
impl<K, V, Codec> Sync for HashMapSubscription<K, V, Codec> where
Codec: Sync,
K: Send + Sync,
V: Send + Sync,
impl<K, V, Codec> Unpin for HashMapSubscription<K, V, Codec> where
K: Unpin,
V: Unpin,
impl<K, V, Codec = Default> !UnwindSafe for HashMapSubscription<K, V, Codec>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
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