Struct ppl::mpsc::channel::ReceiverChannel
source · pub struct ReceiverChannel<T> { /* private fields */ }
Expand description
Struct defining the receiver side of a channel. This struct is implemented by the channel backend. The channel backend is selected at compile time by the feature flag.
Implementations§
source§impl<T> ReceiverChannel<T>where
T: Send,
impl<T> ReceiverChannel<T>where
T: Send,
sourcepub fn receive(&self) -> Result<Option<T>, ReceiverError>
pub fn receive(&self) -> Result<Option<T>, ReceiverError>
Receive a message from the channel.
sourcepub fn try_receive_all(&self) -> Vec<T>
pub fn try_receive_all(&self) -> Vec<T>
Receive all messages from the channel, if any. This method does not block.
sourcepub fn is_blocking(&self) -> bool
pub fn is_blocking(&self) -> bool
Check if the channel is in blocking mode.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for ReceiverChannel<T>
impl<T> Send for ReceiverChannel<T>
impl<T> Sync for ReceiverChannel<T>
impl<T> Unpin for ReceiverChannel<T>
impl<T> !UnwindSafe for ReceiverChannel<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more