#[repr(u8)] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub enum Level { Off = 0, Error = 1, Warn = 2, Info = 3, Debug = 4, Trace = 5, } impl Level { pub const fn as_tracing_level(self) -> tracing::Level { match self { Level::Off | Level::Error => tracing::Level::ERROR, Level::Warn => tracing::Level::WARN, Level::Info => tracing::Level::INFO, Level::Debug => tracing::Level::DEBUG, Level::Trace => tracing::Level::TRACE, } } }