use crate::Message; use std::fmt::{Debug, Display, Formatter}; use tokio::sync::{mpsc, oneshot}; #[derive(Debug)] pub enum Error { SendError(mpsc::error::SendError>), RecvError(oneshot::error::RecvError), TimeoutError, } impl Display for Error { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { write!(f, "ChannelError: {:?}", self) } } impl std::error::Error for Error {}