pub enum SpectraLevel {
Error,
Warn,
Info,
Debug,
Trace,
}Expand description
Verbosity / sampling tier for a Spectra schema (more verbose = greater ordinal).
Variants§
Error
Error-tier emits (always on).
Warn
Warning-tier emits (always on).
Info
Informational emits.
Debug
Debug-tier emits.
Trace
Trace-tier emits.
Implementations§
Source§impl SpectraLevel
impl SpectraLevel
Sourcepub fn parse(s: &str) -> Option<SpectraLevel>
pub fn parse(s: &str) -> Option<SpectraLevel>
Parse SPECTRA_LEVEL / DSL values (error, warn, info, debug, trace).
Sourcepub fn is_always_on(self) -> bool
pub fn is_always_on(self) -> bool
True for tiers that must never be level-gated or statistically sampled away.
Trait Implementations§
Source§impl Clone for SpectraLevel
impl Clone for SpectraLevel
Source§fn clone(&self) -> SpectraLevel
fn clone(&self) -> SpectraLevel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SpectraLevel
Source§impl Debug for SpectraLevel
impl Debug for SpectraLevel
Source§impl Default for SpectraLevel
impl Default for SpectraLevel
Source§fn default() -> SpectraLevel
fn default() -> SpectraLevel
Returns the “default value” for a type. Read more
impl Eq for SpectraLevel
Source§impl Ord for SpectraLevel
impl Ord for SpectraLevel
Source§fn cmp(&self, other: &SpectraLevel) -> Ordering
fn cmp(&self, other: &SpectraLevel) -> Ordering
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 PartialEq for SpectraLevel
impl PartialEq for SpectraLevel
Source§impl PartialOrd for SpectraLevel
impl PartialOrd for SpectraLevel
impl StructuralPartialEq for SpectraLevel
Auto Trait Implementations§
impl Freeze for SpectraLevel
impl RefUnwindSafe for SpectraLevel
impl Send for SpectraLevel
impl Sync for SpectraLevel
impl Unpin for SpectraLevel
impl UnsafeUnpin for SpectraLevel
impl UnwindSafe for SpectraLevel
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.