Enum ergo_sync::ch::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> Copy for SendTimeoutError<T> where
T: Copy,
[src]
T: Copy,
impl<T> Error for SendTimeoutError<T> where
T: Send,
[src]
T: Send,
impl<T> Clone for SendTimeoutError<T> where
T: Clone,
[src]
T: Clone,
fn clone(&self) -> SendTimeoutError<T>
[src]
impl<T> Eq for SendTimeoutError<T> where
T: Eq,
[src]
T: Eq,
impl<T> PartialEq<SendTimeoutError<T>> for SendTimeoutError<T> where
T: PartialEq<T>,
[src]
T: PartialEq<T>,