Expand description

A state distribution channel. The internal state can be borrowed or cloned, but receivers do not observe every value.

When the channel is created, the receiver will immediately observe T::default(). Cloned receivers will immediately observe the latest stored value.

Senders can mutably borrow the contained value (which notifies receivers on release). Receivers can immutably borrow the contained value.

Structs

The receiver half of a watch channel. Can recieve state updates with the postage::Sink trait.

An immutable reference to the value contained in the channel.

A mutable reference to the value contained in the channel. Receivers are notified when the borrow is released.

The sender half of a watch channel. The stored value can be updated with the postage::Sink trait.

Functions

Constructs a new watch channel pair, filled with T::default().

Constructs a new watch channel pair, filled with the provided value

Constructs a pair of channel endpoints that store Option