pub fn channel<S, R>(
tx_buffer: usize,
rx_buffer: usize,
) -> (Channel<S, R>, Channel<R, S>)Expand description
Creates a new channel with the given buffer size. This will return a tuple of
2 Channels, both of which can be used to send and receive messages.
It works with 2 generic types, S and R, which represent the types of
messages that can be sent and received, respectively. The first channel in
the tuple can be used to send messages of type S and receive messages of
type R. The second channel can be used to send messages of type R and
receive messages of type S.