Enum TrySendError
pub enum TrySendError<T> {
Full(T),
Closed(T),
}
Available on crate feature
sync only.Error returned by Sender::try_send.
Variants
Full(T)
The data could not be sent on the channel because the channel is currently full and sending would require blocking.
Closed(T)
The receive half of the channel was explicitly closed or has been dropped.
Implementations
impl<T> TrySendError<T>
pub fn into_inner(self) -> T
Consume the TrySendError, returning the unsent value.
Trait Implementations
impl<T: Clone> Clone for TrySendError<T>
fn clone(&self) -> TrySendError<T>
Returns a duplicate of the value. Read more
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more
impl<T: Copy> Copy for TrySendError<T>
impl<T> Debug for TrySendError<T>
impl<T> Display for TrySendError<T>
impl<T: Eq> Eq for TrySendError<T>
impl<T> Error for TrySendError<T>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl<T> From<SendError<T>> for TrySendError<T>
fn from(src: SendError<T>) -> TrySendError<T>
Converts to this type from the input type.
impl<T: PartialEq> PartialEq for TrySendError<T>
impl<T: PartialEq> StructuralPartialEq for TrySendError<T>
Auto Trait Implementations
impl<T> Freeze for TrySendError<T>where T: Freeze,
impl<T> RefUnwindSafe for TrySendError<T>where T: RefUnwindSafe,
impl<T> Send for TrySendError<T>where T: Send,
impl<T> Sync for TrySendError<T>where T: Sync,
impl<T> Unpin for TrySendError<T>where T: Unpin,
impl<T> UnsafeUnpin for TrySendError<T>where T: UnsafeUnpin,
impl<T> UnwindSafe for TrySendError<T>where T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for Twhere T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CloneToUninit for Twhere T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)
impl<T> Instrument for T
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> ToString for T
impl<T> WithSubscriber for T
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
MIT License
Copyright © Tokio Contributors
https://docs.rs/tokio/1.53.1/tokio/sync/mpsc/error/enum.TrySendError.html