Function single_value_channel::channel[][src]

pub fn channel<T>() -> (Receiver<Option<T>>, Updater<Option<T>>)

Constructs a single value channel. Initial calls to Receiver::latest will return None.

Since the initial value is None all calls to Updater::update must be wrapped in an option. To avoid this consider providing an initial value to the channel with channel_starting_with