sync-oneshot 0.1.0

A minimal oneshot channel for synchronous Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Error returned by the [`Receiver::recv`](crate::Receiver::recv).
///
/// This error is returned by the receiver when the sender is dropped without sending.
#[derive(Debug)]
pub struct RecvError;

/// Error returned by the [`try_recv`](crate::Receiver::try_recv) function on
/// [`Receiver`](crate::Receiver).
#[derive(Debug, PartialEq, Eq)]
pub enum TryRecvError {
    /// The send half of the channel has not yet sent a value.
    Empty,

    /// The send half of the channel was dropped without sending a value.
    Closed,
}