Struct glommio::channels::channel_mesh::Receivers[][src]

pub struct Receivers<T: Send> { /* fields omitted */ }

Receiver side

Implementations

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 ConnectedReceivers with the id of their upstream producers.

Trait Implementations

impl<T: Debug + Send> Debug for Receivers<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Receivers<T>

impl<T> !Send for Receivers<T>

impl<T> !Sync for Receivers<T>

impl<T> Unpin for Receivers<T>

impl<T> !UnwindSafe for Receivers<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.