Skip to main content

channel

Function channel 

Source
pub fn channel<T, D>(
    capacity: usize,
    cancel: CancellationToken,
) -> (Producer<T, D>, Items<T, D>)
Expand description

r[impl jetstream.subscription.surface.producer] The producer/consumer pair for one subscription. cancel is the dispatcher’s token, so cancelling the subscription cancels the work.