pub enum Level {
Critical,
Error,
Warning,
Info,
Debug,
Trace,
}Available on crate features
logging or metrics or tracing or memory-profiling or telemetry-server only.Expand description
Logging level associated with a logging Record
Variants§
Implementations§
Source§impl Level
impl Level
Sourcepub fn as_short_str(&self) -> &'static str
Available on crate feature logging only.
pub fn as_short_str(&self) -> &'static str
logging only.Convert to str from LOG_LEVEL_SHORT_NAMES
Sourcepub fn as_str(&self) -> &'static str
Available on crate feature logging only.
pub fn as_str(&self) -> &'static str
logging only.Convert to str from LOG_LEVEL_NAMES
Sourcepub fn as_usize(&self) -> usize
Available on crate feature logging only.
pub fn as_usize(&self) -> usize
logging only.Cast Level to ordering integer
Critical is the smallest and Trace the biggest value
Sourcepub fn from_usize(u: usize) -> Option<Level>
Available on crate feature logging only.
pub fn from_usize(u: usize) -> Option<Level>
logging only.Get a Level from an usize
This complements as_usize
Trait Implementations§
Source§impl From<Level> for LogVerbosity
Available on crate feature logging only.
impl From<Level> for LogVerbosity
Available on crate feature
logging only.Source§impl From<LogVerbosity> for Level
Available on crate feature logging only.
impl From<LogVerbosity> for Level
Available on crate feature
logging only.Source§fn from(level: LogVerbosity) -> Self
fn from(level: LogVerbosity) -> Self
Converts to this type from the input type.
Source§impl Ord for Level
impl Ord for Level
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Level
impl PartialOrd for Level
impl Copy for Level
impl Eq for Level
impl StructuralPartialEq for Level
Auto Trait Implementations§
impl Freeze for Level
impl RefUnwindSafe for Level
impl Send for Level
impl Sync for Level
impl Unpin for Level
impl UnsafeUnpin for Level
impl UnwindSafe for Level
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request