1 2 3 4 5 6 7 8 9
#[derive(thiserror::Error, Debug)] pub enum Error { #[error("invalid protocol")] InvalidProtocol, #[error("invalid configuration: {0}")] InvalidConfiguration(String), #[error("IO error: {0}")] IO(#[from] std::io::Error), }