[−][src]Module postage::watch
Watch channels can be used to asynchronously transmit state between tasks
When receivers are cloned, they immediately recieve an initial value that is held in the channel.
They will also recieve new values, but are not guaranteed to recieve every value.
Values transmitted over watch channels must implement Default. A simple way to achieve this is to transmit Option<T>
.
Structs
Receiver | The receiver half of a watch channel. Can recieve state updates with the postage::Sink trait. |
Ref | |
Sender | The sender half of a watch channel. The stored value can be updated with the postage::Sink trait. |
Functions
channel | Constructs a new watch channel pair, filled with T::default() |