tower/ready_cache/
error.rs
1pub struct Failed<K>(pub K, pub crate::BoxError);
6
7impl<K: std::fmt::Debug> std::fmt::Debug for Failed<K> {
10 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11 f.debug_tuple("Failed")
12 .field(&self.0)
13 .field(&self.1)
14 .finish()
15 }
16}
17
18impl<K> std::fmt::Display for Failed<K> {
19 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
20 self.1.fmt(f)
21 }
22}
23
24impl<K: std::fmt::Debug> std::error::Error for Failed<K> {
25 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
26 Some(&*self.1)
27 }
28}