Enum TrySendError

pub enum TrySendError<T>

This enumeration is the list of the possible error outcomes for the try_send method.

Variants

Full(T)

The data could not be sent on the sync_channel because it would require that the callee block to send the data.

If this is a buffered channel, then the buffer is full at this time. If this is not a buffered channel, then there is no Receiver available to acquire the data.

Disconnected(T)

This sync_channel's receiving half has disconnected, so the data could not be sent. The data is returned back to the callee in this case.

Trait Implementations

impl<T> Debug for TrySendError<T>

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

impl<T> Display for TrySendError<T>

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

impl<T> Error for TrySendError<T>

impl<T> From<SendError<T>> for TrySendError<T>

fn from(err: SendError<T>) -> TrySendError<T>

Converts a SendError<T> into a TrySendError<T>.

This conversion always returns a TrySendError::Disconnected containing the data in the SendError<T>.

No data is allocated on the heap.

impl<T: Clone> Clone for TrySendError<T>

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

impl<T: Copy> Copy for TrySendError<T>

impl<T: Eq> Eq for TrySendError<T>

fn assert_fields_are_eq(&self)

impl<T: PartialEq> PartialEq for TrySendError<T>

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

impl<T: PartialEq> StructuralPartialEq for TrySendError<T>

Auto Trait Implementations

impl<T> Freeze for TrySendError<T> where T: Freeze + Freeze,

impl<T> RefUnwindSafe for TrySendError<T> where T: RefUnwindSafe + RefUnwindSafe,

impl<T> Send for TrySendError<T> where T: Send + Send,

impl<T> Sync for TrySendError<T> where T: Sync + Sync,

impl<T> Unpin for TrySendError<T> where T: Unpin + Unpin,

impl<T> UnsafeUnpin for TrySendError<T> where T: UnsafeUnpin + UnsafeUnpin,

impl<T> UnwindSafe for TrySendError<T> where T: UnwindSafe + UnwindSafe,

Blanket Implementations

impl<T> Any for TrySendError<T> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for TrySendError<T> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for TrySendError<T> where T: ?Sized,

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

impl<T> CloneToUninit for TrySendError<T> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for TrySendError<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Printable for TrySendError<T> where T: Copy + Debug,

impl<T> SizeHint for TrySendError<T> where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for TrySendError<T>

impl<T> ToOwned for TrySendError<T> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

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

fn to_string(&self) -> String

impl<T, U> Into<U> for TrySendError<T> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom<U> for TrySendError<T> where U: Into<T>,

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

impl<T, U> TryInto<U> for TrySendError<T> where U: TryFrom<T>,

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