Type Alias TrySendError

Source
pub type TrySendError<T> = SendError<T>;

Aliased Type§

struct TrySendError<T> { /* private fields */ }

Implementations

Source§

impl<T> SendError<T>

Source

pub fn full(val: T) -> Self

Source

pub fn disconnected(val: Option<T>) -> Self

Source§

impl<T> SendError<T>

Source

pub fn is_full(&self) -> bool

Returns true if this error is a result of the mpsc being full.

Source

pub fn is_disconnected(&self) -> bool

Returns true if this error is a result of the receiver being dropped.

Source

pub fn into_inner(self) -> Option<T>

Returns the message that was attempted to be sent but failed.

Trait Implementations

Source§

impl<T: Clone> Clone for SendError<T>

Source§

fn clone(&self) -> SendError<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for SendError<T>

Source§

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

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

impl<T> Display for SendError<T>

Source§

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

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

impl<T: Any> Error for SendError<T>

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl<T: PartialEq> PartialEq for SendError<T>

Source§

fn eq(&self, other: &SendError<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: Eq> Eq for SendError<T>

Source§

impl<T> StructuralPartialEq for SendError<T>