1 2 3 4 5 6 7 8 9 10 11
#[derive(Debug, thiserror::Error)] #[error("{msg}")] pub struct RouterError { msg: &'static str, } impl RouterError { pub(super) fn new(msg: &'static str) -> Self { Self { msg } } }