Trait BatchRecv

Source
pub trait BatchRecv<'a>: TryIterRecv<'a> {
    // Provided method
    fn batch_recv(
        &'a self,
        n: usize,
    ) -> Result<BatchIter<Self::Iter>, Self::Error> { ... }
}
Expand description

Trait which provides batched receiving method.

Provided Methods§

Source

fn batch_recv(&'a self, n: usize) -> Result<BatchIter<Self::Iter>, Self::Error>

Creates an iterator yields its first n values. It blocks until the first value comes if the queue is empty.

Implementors§

Source§

impl<'a, T> BatchRecv<'a> for T
where T: TryIterRecv<'a>,