postage 0.5.0

An async channel library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use thiserror::Error;

/// An error type returned by `Stream::try_recv`, when the stream has no messages, or is closed.
#[derive(Debug, Error, PartialEq, Eq)]
pub enum TryRecvError {
    /// The stream may produce an item at a later time
    #[error("TryRecvError::Pending")]
    Pending,
    /// The stream is closed, and will never produce an item
    #[error("TryRecvError::Closed")]
    Closed,
}