#[repr(u8)]pub enum Level {
Missing = 2,
Error = 1,
None = 0,
}
Expand description
Diagnostic levels
§Default
Level
implements Default
, which will return Level::Missing
.
use mock_http_connector::Level;
assert_eq!(Level::default(), Level::Missing);
§Ordering
Level
implements PartialOrd
and Ord
to facilitates comparing two Level
s to
know which one is more verbose. The one with a greater value will be more verbose than the
other.
use mock_http_connector::Level;
assert!(Level::Error < Level::Missing);
assert!(Level::None < Level::Error);
assert_eq!(Level::Missing, Level::Missing);
§Internal value guarantees
This enum implements PartialOrd
and Ord
through an internal representation as u8
.
However, there is no guarantees that the actual integer values for each enum variants will
stay consistent from version to version.
If you want to compare a Level
to a certain value, you should always compare it to a
Level
and not to an integer.
Variants§
Missing = 2
Display information when no cases match the incoming request
Error = 1
Display diagnostic information on errors
None = 0
Never display diagnostic information
Trait Implementations§
Source§impl Ord for Level
impl Ord for Level
Source§impl PartialOrd for Level
impl PartialOrd for Level
impl Copy for Level
impl Eq for Level
impl StructuralPartialEq for Level
Auto Trait Implementations§
impl Freeze for Level
impl RefUnwindSafe for Level
impl Send for Level
impl Sync for Level
impl Unpin for Level
impl UnwindSafe for Level
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more