error.rs (591B)
1 use alloc::string::String; 2 3 #[cfg(feature = "std")] 4 use thiserror::Error; 5 6 #[cfg_attr(feature = "std", derive(Error))] 7 #[derive(Debug)] 8 pub enum Error { 9 #[cfg_attr(feature = "std", error("{0}"))] 10 Msg(String), 11 12 #[cfg(feature = "std")] 13 #[error(transparent)] 14 Init(#[from] tracing_subscriber::util::TryInitError), 15 16 #[cfg(feature = "std")] 17 #[error(transparent)] 18 Io(#[from] std::io::Error), 19 20 #[cfg(feature = "std")] 21 #[error(transparent)] 22 RollingInit(#[from] tracing_appender::rolling::InitError), 23 } 24 25 pub type Result<T> = core::result::Result<T, Error>;