Enum diagnostics::Severity
source · pub enum Severity {
Info,
Warning,
Error,
}
Expand description
An enumeration of possible severity levels.
Variants§
Implementations§
source§impl Severity
impl Severity
sourcepub const fn as_tracing_level(&self) -> Level
pub const fn as_tracing_level(&self) -> Level
Returns log level corresponding to this severity.
sourcepub fn is_error(&self) -> bool
pub fn is_error(&self) -> bool
Returns true
if the severity is Severity::Error
.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Severity
impl<'de> Deserialize<'de> for Severity
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Severity
impl PartialEq for Severity
impl Copy for Severity
impl Eq for Severity
impl StructuralPartialEq for Severity
Auto Trait Implementations§
impl RefUnwindSafe for Severity
impl Send for Severity
impl Sync for Severity
impl Unpin for Severity
impl UnwindSafe for Severity
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