Struct nb_sync::fifo::Receiver[][src]

pub struct Receiver<'a, 'b: 'a, T: 'b> { /* fields omitted */ }

Channel Receiver removing the need for a NonReentrant

The Channel Receiver is not clonable. Since it uses a &mut self on the recv function, it eliminates the need for the caller to explicitly guarantee non-reentrancy when calling the recv function.

Methods

impl<'a, 'b: 'a, T: 'b> Receiver<'a, 'b, T>
[src]

Receives an item from the Channel

This returns a T if successful, otherwise it returns a WouldBlock. It is only unsuccessful if the Channel is empty.

This does not require a NonReentrant guarantee since the &mut self is guarantee enough.

Trait Implementations

impl<'a, 'b: 'a, T: Debug + 'b> Debug for Receiver<'a, 'b, T>
[src]

Formats the value using the given formatter. Read more

impl<'a, 'b: 'a, T: Send + 'b> Send for Receiver<'a, 'b, T>
[src]

impl<'a, 'b: 'a, T: 'b> !Sync for Receiver<'a, 'b, T>
[src]