1 2 3 4 5 6 7 8 9 10
#[derive(Debug, thiserror::Error)] pub enum Error { #[error("io: {0}")] Io(#[from] std::io::Error), #[error("runtime is shutting down")] Shutdown, } pub type Result<T> = std::result::Result<T, Error>;