#[non_exhaustive]pub struct TargetLevel {
pub target: String,
pub level: LogLevel,
pub modifier: LogModifier,
}
Expand description
The log level for specific targets.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.target: String
The target (module name).
level: LogLevel
The level to log at.
modifier: LogModifier
The modifier that controls how to use this log level.
Implementations§
Source§impl TargetLevel
impl TargetLevel
Sourcepub fn new<T: Into<String>>(
target: T,
level: LogLevel,
modifier: LogModifier,
) -> Self
pub fn new<T: Into<String>>( target: T, level: LogLevel, modifier: LogModifier, ) -> Self
Create a new instance for the given target, log level, and modifier.
Sourcepub fn not<T: Into<String>>(target: T, level: LogLevel) -> Self
pub fn not<T: Into<String>>(target: T, level: LogLevel) -> Self
Create a new negated instance for the given target and log level.
Sourcepub fn gt<T: Into<String>>(target: T, level: LogLevel) -> Self
pub fn gt<T: Into<String>>(target: T, level: LogLevel) -> Self
Create a new instance that matches the given target and any log level greater than the one specified.
Sourcepub fn gte<T: Into<String>>(target: T, level: LogLevel) -> Self
pub fn gte<T: Into<String>>(target: T, level: LogLevel) -> Self
Create a new instance that matches the given target and any log level greater than or equal to the one specified.
Sourcepub fn lt<T: Into<String>>(target: T, level: LogLevel) -> Self
pub fn lt<T: Into<String>>(target: T, level: LogLevel) -> Self
Create a new instance that matches the given target and any log level less than or equal to the one specified.
Trait Implementations§
Source§impl Clone for TargetLevel
impl Clone for TargetLevel
Source§fn clone(&self) -> TargetLevel
fn clone(&self) -> TargetLevel
Returns a duplicate 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 TargetLevel
impl Debug for TargetLevel
Source§impl Default for TargetLevel
impl Default for TargetLevel
Source§fn default() -> TargetLevel
fn default() -> TargetLevel
Returns the “default value” for a type. Read more
Source§impl PartialEq for TargetLevel
impl PartialEq for TargetLevel
impl StructuralPartialEq for TargetLevel
Auto Trait Implementations§
impl Freeze for TargetLevel
impl RefUnwindSafe for TargetLevel
impl Send for TargetLevel
impl Sync for TargetLevel
impl Unpin for TargetLevel
impl UnwindSafe for TargetLevel
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<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