pub struct SendRef<'a, T>(/* private fields */);
Available on crate feature
std
only.Expand description
A reference to a message being sent to a blocking channel.
A SendRef
represents the exclusive permission to mutate a given
element in a channel. A SendRef<T>
implements DerefMut<T>
to allow
writing to that element. This is analogous to the Ref
type, except
that it completes a send_ref
or try_send_ref
operation when it is
dropped.
This type is returned by the Sender::send_ref
and
Sender::try_send_ref
(or StaticSender::send_ref
and
StaticSender::try_send_ref
) methods.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for SendRef<'a, T>
impl<'a, T> !RefUnwindSafe for SendRef<'a, T>
impl<'a, T> Send for SendRef<'a, T>where
T: Send,
impl<'a, T> Sync for SendRef<'a, T>where
T: Send,
impl<'a, T> Unpin for SendRef<'a, T>
impl<'a, T> !UnwindSafe for SendRef<'a, 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