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