1//! Watch error types.
2
3use std::fmt;
4
5#[derive(Debug, Eq, PartialEq)]
6pub struct NoReceiverError;
7
8impl fmt::Display for NoReceiverError {
9 fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
10 write!(fmt, "all receivers were dropped")
11 }
12}
13
14impl std::error::Error for NoReceiverError {}
15
16#[derive(Debug, Eq, PartialEq)]
17pub struct NoSenderError;
18
19impl fmt::Display for NoSenderError {
20 fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
21 write!(fmt, "sender was dropped")
22 }
23}
24
25impl std::error::Error for NoSenderError {}