pub struct Receiver<T> { /* private fields */ }
Expand description
The receiving side of a channel.
Implementations§
source§impl<T> Receiver<T>
impl<T> Receiver<T>
sourcepub fn recv(&self) -> Result<T, RecvError>
pub fn recv(&self) -> Result<T, RecvError>
Blocks the current thread until a message is received or the channel is empty and disconnected.
If the channel is empty and not disconnected, this call will block until the receive operation can proceed. If the channel is empty and becomes disconnected, this call will wake up and return an error.
Trait Implementations§
impl<T: Send> Send for Receiver<T>
impl<T: Send> Sync for Receiver<T>
Auto Trait Implementations§
impl<T> Freeze for Receiver<T>
impl<T> !RefUnwindSafe for Receiver<T>
impl<T> Unpin for Receiver<T>where
T: Unpin,
impl<T> !UnwindSafe for Receiver<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)