channel_with_option

Function channel_with_option 

Source
pub fn channel_with_option<T: Clone>() -> (Sender<Option<T>>, Receiver<Option<T>>)
Expand description

Constructs a pair of channel endpoints that store Option

This is helpful if T does not implement Default, and you don’t have an initial value.