pub struct Receiver<'a, M: RawMutex, T> { /* private fields */ }Expand description
Receive-only access to a Channel.
Implementations§
Source§impl<'a, M: RawMutex, T> Receiver<'a, M, T>
impl<'a, M: RawMutex, T> Receiver<'a, M, T>
Sourcepub fn borrow(&mut self) -> Receiver<'_, M, T>
pub fn borrow(&mut self) -> Receiver<'_, M, T>
Creates one further Receiver over the same channel.
Sourcepub fn try_receive(&mut self) -> Option<ReceiveSlot<'_, M, T>>
pub fn try_receive(&mut self) -> Option<ReceiveSlot<'_, M, T>>
Attempts to receive a value over the channel.
Sourcepub fn poll_receive(
&mut self,
cx: &mut Context<'_>,
) -> Poll<ReceiveSlot<'_, M, T>>
pub fn poll_receive( &mut self, cx: &mut Context<'_>, ) -> Poll<ReceiveSlot<'_, M, T>>
Attempts to asynchronously receive a value over the channel.
Sourcepub fn receive(&mut self) -> impl Future<Output = ReceiveSlot<'_, M, T>>
pub fn receive(&mut self) -> impl Future<Output = ReceiveSlot<'_, M, T>>
Asynchronously receive a value over the channel.
Trait Implementations§
Auto Trait Implementations§
impl<'a, M, T> Freeze for Receiver<'a, M, T>
impl<'a, M, T> !RefUnwindSafe for Receiver<'a, M, T>
impl<'a, M, T> Send for Receiver<'a, M, T>
impl<'a, M, T> Sync for Receiver<'a, M, T>
impl<'a, M, T> Unpin for Receiver<'a, M, T>
impl<'a, M, T> !UnwindSafe for Receiver<'a, M, 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