Enum crossbeam_channel::SendTimeoutError
[−]
[src]
pub enum SendTimeoutError<T> { Timeout(T), Disconnected(T), }
This enumeration is the list of possible errors that made send_timeout
unable to return
data when called. This can occur with bounded channels only.
Variants
Timeout(T)
This channel is currently full, but the receivers have not yet disconnected.
Disconnected(T)
The channel's receiving half has become disconnected.
Methods
impl<T> SendTimeoutError<T>
[src]
fn into_inner(self) -> T
[src]
Unwraps the value.
Examples
use std::time::Duration; use crossbeam_channel::unbounded; let (tx, rx) = unbounded(); if let Err(err) = tx.send_timeout("foo", Duration::from_secs(0)) { assert_eq!(err.into_inner(), "foo"); }
Trait Implementations
impl<T: PartialEq> PartialEq for SendTimeoutError<T>
[src]
fn eq(&self, __arg_0: &SendTimeoutError<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SendTimeoutError<T>) -> bool
[src]
This method tests for !=
.
impl<T: Eq> Eq for SendTimeoutError<T>
[src]
impl<T: Clone> Clone for SendTimeoutError<T>
[src]
fn clone(&self) -> SendTimeoutError<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Copy> Copy for SendTimeoutError<T>
[src]
impl<T> Debug for SendTimeoutError<T>
[src]
impl<T> Display for SendTimeoutError<T>
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more