#[non_exhaustive]#[repr(u8)]pub enum LogLevel {
Silent = 0,
Error = 1,
Warn = 2,
Info = 3,
Debug = 4,
}Expand description
Severity of a diagnostic record.
Discriminants match the C++ drm::LogLevel byte-for-byte, so a consumer
bridging both libraries can cast between them. Ordering is by verbosity:
a record is admitted when the active level is >= the record’s level, so
LogLevel::Silent admits nothing and LogLevel::Debug admits all.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Silent = 0
Emit nothing.
Error = 1
Unrecoverable or consumer-visible failures.
Warn = 2
Recoverable problems and fallbacks taken.
Info = 3
Lifecycle milestones. The default.
Debug = 4
Per-frame and per-decision detail.
Implementations§
Source§impl LogLevel
impl LogLevel
Sourcepub const ALL: [Self; 5]
pub const ALL: [Self; 5]
Every level, ascending by verbosity. LogLevel::Silent is included.
Sourcepub const fn tag(self) -> &'static str
pub const fn tag(self) -> &'static str
The lowercase tag the default sink prints inside [drm:...].
LogLevel::Silent has no tag and yields "silent" only for
diagnostics; it is never printed, because the level gate rejects it
first.
Trait Implementations§
impl Copy for LogLevel
impl Eq for LogLevel
Source§impl Ord for LogLevel
impl Ord for LogLevel
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for LogLevel
impl PartialOrd for LogLevel
impl StructuralPartialEq for LogLevel
Auto Trait Implementations§
impl Freeze for LogLevel
impl RefUnwindSafe for LogLevel
impl Send for LogLevel
impl Sync for LogLevel
impl Unpin for LogLevel
impl UnsafeUnpin for LogLevel
impl UnwindSafe for LogLevel
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