pub enum LogLevel {
Debug,
Info,
Notice,
Warning,
Error,
Critical,
Alert,
Emergency,
}Expand description
RFC 5424 syslog severity levels, as used by the MCP logging/setLevel
request and notifications/message log entries — ordered from most to
least verbose so level < min_level comparisons work directly (this
relies on declaration order matching severity order; don’t reorder the
variants).
use rust_web_server::mcp::LogLevel;
assert!(LogLevel::Debug < LogLevel::Warning);
assert!(LogLevel::Emergency > LogLevel::Error);
assert_eq!(LogLevel::parse("warning"), Some(LogLevel::Warning));
assert_eq!(LogLevel::Warning.as_str(), "warning");Variants§
Implementations§
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
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.