pub enum Severity {
Info,
Success,
Warning,
Error,
Critical,
}Expand description
Severity, lowest to highest. Error and Critical raise the effective priority to at
least High. Every severity has a horn name on the Honk scale: Severity::LIGHT,
Severity::BEEP, Severity::LOUD, Severity::LONG, Severity::BLAST.
use honk::Severity;
assert_eq!(Severity::LOUD, Severity::Warning);
assert_eq!("Loud".parse::<Severity>().unwrap(), Severity::Warning);
assert_eq!(Severity::BLAST.to_string(), "critical"); // always sent canonicalVariants§
Info
info (light honk). The default.
Success
success (beep-beep).
Warning
warning (loud honk).
Error
error (long honk). Pushes at least as high priority.
Critical
critical (blast). Pushes at least as high priority.
Implementations§
Source§impl Severity
impl Severity
Sourcepub const LIGHT: Severity = Severity::Info
pub const LIGHT: Severity = Severity::Info
Light honk: an alias of Severity::Info.
Sourcepub const BEEP: Severity = Severity::Success
pub const BEEP: Severity = Severity::Success
Beep-beep: an alias of Severity::Success.
Sourcepub const LOUD: Severity = Severity::Warning
pub const LOUD: Severity = Severity::Warning
Loud honk: an alias of Severity::Warning.
Sourcepub const LONG: Severity = Severity::Error
pub const LONG: Severity = Severity::Error
Long honk: an alias of Severity::Error.
Sourcepub const BLAST: Severity = Severity::Critical
pub const BLAST: Severity = Severity::Critical
Blast: an alias of Severity::Critical.
Trait Implementations§
impl Copy for Severity
impl Eq for Severity
impl StructuralPartialEq for Severity
Auto Trait Implementations§
impl Freeze for Severity
impl RefUnwindSafe for Severity
impl Send for Severity
impl Sync for Severity
impl Unpin for Severity
impl UnsafeUnpin 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