1#[derive(Debug, PartialEq, Eq)]
3pub enum TrySendError<T> {
4 Pending(T),
6 Rejected(T),
8}
9
10impl<T> std::fmt::Display for TrySendError<T>
11where
12 T: std::fmt::Debug,
13{
14 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15 f.write_fmt(format_args!("{:?}", &self))?;
16
17 Ok(())
18 }
19}
20
21impl<T> std::error::Error for TrySendError<T> where T: std::fmt::Debug {}
22
23#[derive(Debug, PartialEq, Eq)]
25pub struct SendError<T>(pub T);
26
27impl<T> std::fmt::Display for SendError<T>
28where
29 T: std::fmt::Debug,
30{
31 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
32 f.write_fmt(format_args!("{:?}", &self))?;
33
34 Ok(())
35 }
36}
37
38impl<T> std::error::Error for SendError<T> where T: std::fmt::Debug {}