pub trait TryIterRecv<'a> {
type Iter: Iterator + 'a;
type Error;
// Required methods
fn try_iter(&'a self) -> Self::Iter;
fn recv(&self) -> Result<<Self::Iter as Iterator>::Item, Self::Error>;
}
Expand description
Trait for queues which have batch-able receiving method.
This is mainly used by BatchRecv
trait.
At first, BatchRecv
trait calls recv
which blocks the thread until the first value comes.
And then, it calls try_iter
to retrieve the following values.