Enum SendTimeoutError
enum SendTimeoutError<T>
An error returned from the send_timeout method.
The error contains the message being sent so it can be recovered.
Variants
-
Timeout(T) The message could not be sent because the channel is full and the operation timed out.
If this is a zero-capacity channel, then the error indicates that there was no receiver available to receive the message and the operation timed out.
-
Disconnected(T) The message could not be sent because the channel is disconnected.
Implementations
impl<T> SendTimeoutError<T>
fn into_inner(self: Self) -> TUnwraps the message.
Examples
use Duration; use unbounded; let = unbounded; if let Err = s.send_timeoutfn is_timeout(self: &Self) -> boolReturns
trueif the send operation timed out.fn is_disconnected(self: &Self) -> boolReturns
trueif the send operation failed because the channel is disconnected.
impl<T> Any for SendTimeoutError<T>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for SendTimeoutError<T>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for SendTimeoutError<T>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for SendTimeoutError<T>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> Debug for SendTimeoutError<T>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<T> Display for SendTimeoutError<T>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<T> Freeze for SendTimeoutError<T>
impl<T> From for SendTimeoutError<T>
fn from(err: SendError<T>) -> SendTimeoutError<T>
impl<T> From for SendTimeoutError<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> RefUnwindSafe for SendTimeoutError<T>
impl<T> Send for SendTimeoutError<T>
impl<T> StructuralPartialEq for SendTimeoutError<T>
impl<T> Sync for SendTimeoutError<T>
impl<T> ToOwned for SendTimeoutError<T>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for SendTimeoutError<T>
fn to_string(self: &Self) -> String
impl<T> Unpin for SendTimeoutError<T>
impl<T> UnsafeUnpin for SendTimeoutError<T>
impl<T> UnwindSafe for SendTimeoutError<T>
impl<T, U> Into for SendTimeoutError<T>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for SendTimeoutError<T>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for SendTimeoutError<T>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T: $crate::clone::Clone> Clone for SendTimeoutError<T>
fn clone(self: &Self) -> SendTimeoutError<T>
impl<T: $crate::cmp::Eq> Eq for SendTimeoutError<T>
impl<T: $crate::cmp::PartialEq> PartialEq for SendTimeoutError<T>
fn eq(self: &Self, other: &SendTimeoutError<T>) -> bool