//! Errors /// An error indicating that the service with a `K`-typed key failed with an /// error. pub struct Failed(pub K, pub crate::BoxError); // === Failed === impl std::fmt::Debug for Failed { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.debug_tuple("Failed") .field(&self.0) .field(&self.1) .finish() } } impl std::fmt::Display for Failed { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.1.fmt(f) } } impl std::error::Error for Failed { fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { Some(&*self.1) } }