Skip to main content

channel

Function channel 

Source
pub fn channel<T: Copy + 'static, const N: usize>() -> Result<(Sender<T, N>, Receiver<T, N>)>
Expand description

Construct a heap-allocated channel with one initial sender + one initial receiver. Clone either half to fan out.

Requires the alloc feature and a heap-mode build (i.e. not CONFIG_OVE_ZERO_HEAP=y). Zero-heap callers must use Sender::from_static + Receiver::from_static instead.