pub struct Receiver<'ch, M, T, K, const N: usize>{ /* private fields */ }
Expand description
Receive-only access to a PriorityChannel
.
Implementations§
Source§impl<'ch, M, T, K, const N: usize> Receiver<'ch, M, T, K, N>
impl<'ch, M, T, K, const N: usize> Receiver<'ch, M, T, K, N>
Sourcepub fn receive(&self) -> ReceiveFuture<'_, M, T, K, N> ⓘ
pub fn receive(&self) -> ReceiveFuture<'_, M, T, K, N> ⓘ
Receive the next value.
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
Sourcepub const fn capacity(&self) -> usize
pub const fn capacity(&self) -> usize
Returns the maximum number of elements the channel can hold.
Sourcepub fn free_capacity(&self) -> usize
pub fn free_capacity(&self) -> usize
Returns the free capacity of the channel.
Trait Implementations§
Source§impl<'ch, M, T, K, const N: usize> From<Receiver<'ch, M, T, K, N>> for DynamicReceiver<'ch, T>
impl<'ch, M, T, K, const N: usize> From<Receiver<'ch, M, T, K, N>> for DynamicReceiver<'ch, T>
impl<'ch, M, T, K, const N: usize> Copy for Receiver<'ch, M, T, K, N>
Auto Trait Implementations§
impl<'ch, M, T, K, const N: usize> Freeze for Receiver<'ch, M, T, K, N>
impl<'ch, M, T, K, const N: usize> !RefUnwindSafe for Receiver<'ch, M, T, K, N>
impl<'ch, M, T, K, const N: usize> Send for Receiver<'ch, M, T, K, N>
impl<'ch, M, T, K, const N: usize> Sync for Receiver<'ch, M, T, K, N>
impl<'ch, M, T, K, const N: usize> Unpin for Receiver<'ch, M, T, K, N>
impl<'ch, M, T, K, const N: usize> !UnwindSafe for Receiver<'ch, M, T, K, 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