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

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: PartialEq> PartialEq for SendTimeoutError<T>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

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

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

[src]

Returns a copy of the value. Read more

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]

[src]

Formats the value using the given formatter.

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

[src]

Formats the value using the given formatter. Read more

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

[src]

A short description of the error. Read more

[src]

The lower-level cause of this error, if any. Read more