pub struct SendableDynamicReceiver<'ch, T> { /* private fields */ }
Expand description
Receive-only access to a Channel
without knowing channel size.
This version can be sent between threads but can only be created if the underlying mutex is Sync.
Implementations§
Source§impl<'ch, T> SendableDynamicReceiver<'ch, T>
impl<'ch, T> SendableDynamicReceiver<'ch, T>
Sourcepub fn receive(&self) -> DynamicReceiveFuture<'_, T> ⓘ
pub fn receive(&self) -> DynamicReceiveFuture<'_, T> ⓘ
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, T> Clone for SendableDynamicReceiver<'ch, T>
impl<'ch, T> Clone for SendableDynamicReceiver<'ch, T>
Source§impl<'ch, M, T, const N: usize> From<Receiver<'ch, M, T, N>> for SendableDynamicReceiver<'ch, T>
impl<'ch, M, T, const N: usize> From<Receiver<'ch, M, T, N>> for SendableDynamicReceiver<'ch, T>
impl<'ch, T> Copy for SendableDynamicReceiver<'ch, T>
impl<'ch, T: Send> Send for SendableDynamicReceiver<'ch, T>
impl<'ch, T: Send> Sync for SendableDynamicReceiver<'ch, T>
Auto Trait Implementations§
impl<'ch, T> Freeze for SendableDynamicReceiver<'ch, T>
impl<'ch, T> !RefUnwindSafe for SendableDynamicReceiver<'ch, T>
impl<'ch, T> Unpin for SendableDynamicReceiver<'ch, T>
impl<'ch, T> !UnwindSafe for SendableDynamicReceiver<'ch, 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