new

Function new 

Source
pub fn new<T>(capacity: usize) -> (Sender<T>, Receiver<T>)
Expand description

Create a new bounded channel.

The capacity must be in the range MIN_CAP..=MAX_CAP.