use std::fmt;
#[derive(Debug)]
pub struct SendError<T> {
pub(crate) inner: T,
}
impl<T> SendError<T> {
pub fn value(self) -> T {
self.inner
}
}
impl<T: fmt::Debug> fmt::Display for SendError<T> {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(fmt, "channel closed")
}
}
impl<T: fmt::Debug> std::error::Error for SendError<T> {}