pub enum LogLevel {
Verbose,
Info,
Warn,
Error,
Critical,
}Expand description
Enum representing different log levels.
Variants§
Implementations§
Source§impl LogLevel
impl LogLevel
Sourcepub fn is_at_least(&self, level: LogLevel) -> bool
pub fn is_at_least(&self, level: LogLevel) -> bool
Checks if the current log level is at least as severe as the provided level.
use breadcrumbs::LogLevel;
let log_level = LogLevel::Info;
assert!(log_level.is_at_least(LogLevel::Info));
assert!(log_level.is_at_least(LogLevel::Verbose));
assert!(!log_level.is_at_least(LogLevel::Warn));pub fn from_str(level: &str) -> LogLevel
Trait Implementations§
Source§impl Ord for LogLevel
impl Ord for LogLevel
Source§impl PartialOrd for LogLevel
impl PartialOrd for LogLevel
impl Copy for LogLevel
impl Eq for LogLevel
impl StructuralPartialEq for LogLevel
Auto Trait Implementations§
impl Freeze for LogLevel
impl RefUnwindSafe for LogLevel
impl Send for LogLevel
impl Sync for LogLevel
impl Unpin for LogLevel
impl UnwindSafe for LogLevel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more