Skip to main content

sync_oneshot/
error.rs

1/// Error returned by the [`Receiver::recv`](crate::Receiver::recv).
2///
3/// This error is returned by the receiver when the sender is dropped without sending.
4#[derive(Debug)]
5pub struct RecvError;
6
7/// Error returned by the [`try_recv`](crate::Receiver::try_recv) function on
8/// [`Receiver`](crate::Receiver).
9#[derive(Debug, PartialEq, Eq)]
10pub enum TryRecvError {
11    /// The send half of the channel has not yet sent a value.
12    Empty,
13
14    /// The send half of the channel was dropped without sending a value.
15    Closed,
16}