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]
impl<'a, 'b: 'a, T: 'b> Receiver<'a, 'b, T>
pub fn recv(&mut self) -> Result<T, !>
[src]
pub fn recv(&mut self) -> Result<T, !>
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.