#[repr(u32)]pub enum LodFilter {
Off = 0,
Min = 1,
Med = 2,
Max = 3,
}Expand description
An enum representing the available verbosity level filters of the logger.
Variants§
Off = 0
A level lower than all log levels.
Min = 1
Corresponds to the Min log level.
Med = 2
Corresponds to the Med log level.
Max = 3
Corresponds to the Max log level.
Implementations§
Source§impl LodFilter
impl LodFilter
Sourcepub fn to_level(self) -> Option<Verbosity>
pub fn to_level(self) -> Option<Verbosity>
Converts self to the equivalent Lod.
Returns None if self is LodFilter::Off.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Returns the string representation of the LodFilter.
This returns the same string as the fmt::Display implementation.
Sourcepub fn iter() -> impl Iterator<Item = LodFilter>
pub fn iter() -> impl Iterator<Item = LodFilter>
Iterate through all supported filtering levels.
The order of iteration is from less to more verbose filtering.
§Examples
use micromegas_tracing::prelude::*;
let mut lod_filters = LodFilter::iter();
assert_eq!(Some(LodFilter::Off), lod_filters.next());
assert_eq!(Some(LodFilter::Max), lod_filters.last());Trait Implementations§
Source§impl Ord for LodFilter
impl Ord for LodFilter
Source§impl PartialOrd<LodFilter> for Verbosity
impl PartialOrd<LodFilter> for Verbosity
Source§impl PartialOrd<Verbosity> for LodFilter
impl PartialOrd<Verbosity> for LodFilter
Source§impl PartialOrd for LodFilter
impl PartialOrd for LodFilter
impl Copy for LodFilter
impl Eq for LodFilter
impl StructuralPartialEq for LodFilter
Auto Trait Implementations§
impl Freeze for LodFilter
impl RefUnwindSafe for LodFilter
impl Send for LodFilter
impl Sync for LodFilter
impl Unpin for LodFilter
impl UnwindSafe for LodFilter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.