Struct embassy_sync::channel::Receiver
source · pub struct Receiver<'ch, M, T, const N: usize>where
M: RawMutex,{ /* private fields */ }
Expand description
Receive-only access to a Channel
.
Implementations§
source§impl<'ch, M, T, const N: usize> Receiver<'ch, M, T, N>where
M: RawMutex,
impl<'ch, M, T, const N: usize> Receiver<'ch, M, T, N>where
M: RawMutex,
sourcepub fn receive(&self) -> ReceiveFuture<'_, M, T, N> ⓘ
pub fn receive(&self) -> ReceiveFuture<'_, M, T, N> ⓘ
Receive the next value.
See Channel::receive()
.
sourcepub fn try_receive(&self) -> Result<T, TryReceiveError>
pub fn try_receive(&self) -> Result<T, TryReceiveError>
Attempt to immediately receive the next value.
sourcepub fn poll_ready_to_receive(&self, cx: &mut Context<'_>) -> Poll<()>
pub fn poll_ready_to_receive(&self, cx: &mut Context<'_>) -> Poll<()>
Allows a poll_fn to poll until the channel is ready to receive
sourcepub fn poll_receive(&self, cx: &mut Context<'_>) -> Poll<T>
pub fn poll_receive(&self, cx: &mut Context<'_>) -> Poll<T>
Poll the channel for the next item
Trait Implementations§
source§impl<'ch, M, T, const N: usize> From<Receiver<'ch, M, T, N>> for DynamicReceiver<'ch, T>where
M: RawMutex,
impl<'ch, M, T, const N: usize> From<Receiver<'ch, M, T, N>> for DynamicReceiver<'ch, T>where
M: RawMutex,
impl<'ch, M, T, const N: usize> Copy for Receiver<'ch, M, T, N>where
M: RawMutex,
Auto Trait Implementations§
impl<'ch, M, T, const N: usize> Freeze for Receiver<'ch, M, T, N>
impl<'ch, M, T, const N: usize> !RefUnwindSafe for Receiver<'ch, M, T, N>
impl<'ch, M, T, const N: usize> Send for Receiver<'ch, M, T, N>
impl<'ch, M, T, const N: usize> Sync for Receiver<'ch, M, T, N>
impl<'ch, M, T, const N: usize> Unpin for Receiver<'ch, M, T, N>
impl<'ch, M, T, const N: usize> !UnwindSafe for Receiver<'ch, M, T, N>
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