pub struct SendDynamicSender<'ch, T> { /* private fields */ }
Expand description
Send-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> SendDynamicSender<'ch, T>
impl<'ch, T> SendDynamicSender<'ch, T>
Sourcepub fn send(&self, message: T) -> DynamicSendFuture<'ch, T> ⓘ
pub fn send(&self, message: T) -> DynamicSendFuture<'ch, T> ⓘ
Sends a value.
See Channel::send()
Sourcepub fn try_send(&self, message: T) -> Result<(), TrySendError<T>>
pub fn try_send(&self, message: T) -> Result<(), TrySendError<T>>
Attempt to immediately send a message.
See Channel::send()
Sourcepub fn poll_ready_to_send(&self, cx: &mut Context<'_>) -> Poll<()>
pub fn poll_ready_to_send(&self, cx: &mut Context<'_>) -> Poll<()>
Allows a poll_fn to poll until the channel is ready to send
Trait Implementations§
Source§impl<'ch, T> Clone for SendDynamicSender<'ch, T>
impl<'ch, T> Clone for SendDynamicSender<'ch, T>
Source§fn clone(&self) -> SendDynamicSender<'ch, T>
fn clone(&self) -> SendDynamicSender<'ch, T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'ch, M, T, const N: usize> From<Sender<'ch, M, T, N>> for SendDynamicSender<'ch, T>
impl<'ch, M, T, const N: usize> From<Sender<'ch, M, T, N>> for SendDynamicSender<'ch, T>
Source§fn from(s: Sender<'ch, M, T, N>) -> SendDynamicSender<'ch, T>
fn from(s: Sender<'ch, M, T, N>) -> SendDynamicSender<'ch, T>
Converts to this type from the input type.
impl<'ch, T> Copy for SendDynamicSender<'ch, T>
impl<'ch, T> Send for SendDynamicSender<'ch, T>where
T: Send,
impl<'ch, T> Sync for SendDynamicSender<'ch, T>where
T: Send,
Auto Trait Implementations§
impl<'ch, T> Freeze for SendDynamicSender<'ch, T>
impl<'ch, T> !RefUnwindSafe for SendDynamicSender<'ch, T>
impl<'ch, T> Unpin for SendDynamicSender<'ch, T>
impl<'ch, T> !UnwindSafe for SendDynamicSender<'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