tower/load_shed/
error.rs
1use std::fmt;
4
5#[derive(Default)]
11pub struct Overloaded {
12 _p: (),
13}
14
15impl Overloaded {
16 pub fn new() -> Self {
18 Overloaded { _p: () }
19 }
20}
21
22impl fmt::Debug for Overloaded {
23 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
24 f.write_str("Overloaded")
25 }
26}
27
28impl fmt::Display for Overloaded {
29 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
30 f.write_str("service overloaded")
31 }
32}
33
34impl std::error::Error for Overloaded {}