Struct thingbuf::mpsc::blocking::RecvRef

source ·
pub struct RecvRef<'a, T>(_);
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§

source§

impl<T: Debug> Debug for RecvRef<'_, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Deref for RecvRef<'_, T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<T> DerefMut for RecvRef<'_, T>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<T: Display> Display for RecvRef<'_, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Write> Write for RecvRef<'_, T>

source§

fn write_str(&mut self, s: &str) -> Result

Writes a string slice into this writer, returning whether the write succeeded. Read more
source§

fn write_char(&mut self, c: char) -> Result

Writes a char into this writer, returning whether the write succeeded. Read more
source§

fn write_fmt(&mut self, f: Arguments<'_>) -> Result

Glue for usage of the write! macro with implementors of this trait. Read more

Auto Trait Implementations§

§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.