1 2 3 4 5 6 7 8 9 10 11
use std::fmt::Debug; use thiserror::Error; #[derive(Error, Debug)] pub enum MediatorError<E> where E: Debug + PartialEq + Send + Sync + 'static, { #[error("channel between {from:?} and {to:?} is closed")] ChannelClosed { from: E, to: E }, }