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

This channel is currently full, but the receivers have not yet disconnected.

The channel's receiving half has become disconnected.

Methods

impl<T> SendTimeoutError<T>
[src]

[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]

impl<T> Error for SendTimeoutError<T> where
    T: Send
[src]

[src]

[src]

impl<T> Clone for SendTimeoutError<T> where
    T: Clone
[src]

[src]

impl<T> Eq for SendTimeoutError<T> where
    T: Eq
[src]

impl<T> PartialEq<SendTimeoutError<T>> for SendTimeoutError<T> where
    T: PartialEq<T>, 
[src]

[src]

[src]

impl<T> Debug for SendTimeoutError<T>
[src]

[src]

impl<T> Display for SendTimeoutError<T>
[src]

[src]