Enum spdlog::LevelFilter
source · #[repr(align(4))]pub enum LevelFilter {
Off,
Equal(Level),
NotEqual(Level),
MoreSevere(Level),
MoreSevereEqual(Level),
MoreVerbose(Level),
MoreVerboseEqual(Level),
All,
}
Expand description
An enum representing log level logical filter conditions.
A LevelFilter
may be compared to a Level
through
LevelFilter::compare
.
§Examples
use spdlog::prelude::*;
let level_filter: LevelFilter = LevelFilter::MoreSevere(Level::Info);
assert_eq!(level_filter.compare(Level::Trace), false);
assert_eq!(level_filter.compare(Level::Info), false);
assert_eq!(level_filter.compare(Level::Warn), true);
assert_eq!(level_filter.compare(Level::Error), true);
Variants§
Off
Disables all levels.
Equal(Level)
Enables if the target level is equal to the filter level.
NotEqual(Level)
Enables if the target level is not equal to the filter level.
MoreSevere(Level)
Enables if the target level is more severe than the filter level.
MoreSevereEqual(Level)
Enables if the target level is more severe than or equal to the filter level.
MoreVerbose(Level)
Enables if the target level is more verbose than the filter level.
MoreVerboseEqual(Level)
Enables if the target level is more verbose than or equal to the filter level.
All
Enables all levels.
Implementations§
source§impl LevelFilter
impl LevelFilter
Trait Implementations§
source§impl Clone for LevelFilter
impl Clone for LevelFilter
source§fn clone(&self) -> LevelFilter
fn clone(&self) -> LevelFilter
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LevelFilter
impl Debug for LevelFilter
source§impl From<LevelFilter> for LevelFilter
Available on crate feature log
only.
impl From<LevelFilter> for LevelFilter
Available on crate feature
log
only.source§fn from(filter: LevelFilter) -> Self
fn from(filter: LevelFilter) -> Self
Converts to this type from the input type.
source§impl Hash for LevelFilter
impl Hash for LevelFilter
source§impl PartialEq for LevelFilter
impl PartialEq for LevelFilter
source§fn eq(&self, other: &LevelFilter) -> bool
fn eq(&self, other: &LevelFilter) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for LevelFilter
impl Eq for LevelFilter
impl StructuralPartialEq for LevelFilter
Auto Trait Implementations§
impl RefUnwindSafe for LevelFilter
impl Send for LevelFilter
impl Sync for LevelFilter
impl Unpin for LevelFilter
impl UnwindSafe for LevelFilter
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