pub struct Receiver<T> { /* private fields */ }Expand description
Receiving half of the single-value channel.
Implementations§
Source§impl<T> Receiver<T>
impl<T> Receiver<T>
Sourcepub fn recv(&mut self) -> RecvFuture<'_, T> ⓘ
pub fn recv(&mut self) -> RecvFuture<'_, T> ⓘ
Receive the value, waiting for the send.
The returned future resolves Err(()) when the sender dropped
without sending.
Sourcepub fn poll_recv(&mut self, cx: &mut Context<'_>) -> Poll<Result<T, ()>>
pub fn poll_recv(&mut self, cx: &mut Context<'_>) -> Poll<Result<T, ()>>
Poll for the value, registering cx’s waker while it is not yet
sent. Resolves Err(()) when the sender dropped without sending.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Receiver<T>
impl<T> RefUnwindSafe for Receiver<T>
impl<T> Send for Receiver<T>
impl<T> Sync for Receiver<T>
impl<T> Unpin for Receiver<T>
impl<T> UnsafeUnpin for Receiver<T>
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