Enum spdlog::prelude::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
sourceimpl LevelFilter
impl LevelFilter
Trait Implementations
sourceimpl Clone for LevelFilter
impl Clone for LevelFilter
sourcefn clone(&self) -> LevelFilter
fn clone(&self) -> LevelFilter
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LevelFilter
impl Debug for LevelFilter
sourceimpl From<LevelFilter> for LevelFilter
This is supported on crate feature log
only.
impl From<LevelFilter> for LevelFilter
log
only.sourcefn from(filter: LevelFilter) -> Self
fn from(filter: LevelFilter) -> Self
Performs the conversion.
sourceimpl Hash for LevelFilter
impl Hash for LevelFilter
sourceimpl PartialEq<LevelFilter> for LevelFilter
impl PartialEq<LevelFilter> for LevelFilter
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &LevelFilter) -> bool
fn ne(&self, other: &LevelFilter) -> bool
This method tests for !=
.
impl Copy for LevelFilter
impl Eq for LevelFilter
impl StructuralEq 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more