Struct glommio::channels::channel_mesh::Receivers [−][src]
pub struct Receivers<T: Send> { /* fields omitted */ }
Receiver side
Implementations
impl<T: Send> Receivers<T>
[src]
impl<T: Send> Receivers<T>
[src]pub fn peer_id(&self) -> usize
[src]
Index of the local executor in the list of all peers
pub fn consumer_id(&self) -> Option<usize>
[src]
Index of the local executor in the list of consumers.
pub fn nr_producers(&self) -> usize
[src]
Number of peers from which message can be received.
pub async fn recv_from(&self, idx: usize) -> Result<Option<T>, ()>
[src]
Receive a message from the idx-th producer
It returns a GlommioError::IoError
encapsulating a InvalidInput
if the idx is out of the range of available receivers, or the
receiver is a placeholder in the case of full mesh.
See ConnectedReceiver.recv
for how the underlying sender works.
pub fn streams(&mut self) -> Vec<(usize, ConnectedReceiver<T>)>
[src]
Returns a vec of ConnectedReceiver
s with the id of their upstream
producers.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Receivers<T>
impl<T> !RefUnwindSafe for Receivers<T>
impl<T> !UnwindSafe for Receivers<T>
impl<T> !UnwindSafe for Receivers<T>