pub enum DegradationLevel {
Normal = 0,
Light = 1,
Moderate = 2,
Severe = 3,
Critical = 4,
}Expand description
Degradation level for system operation.
Variants§
Normal = 0
Full functionality.
Light = 1
Minor degradation (e.g., increased latency acceptable).
Moderate = 2
Moderate degradation (e.g., some features disabled).
Severe = 3
Severe degradation (e.g., read-only mode).
Critical = 4
Critical (e.g., emergency mode only).
Implementations§
Source§impl DegradationLevel
impl DegradationLevel
Sourcepub fn next_worse(self) -> Self
pub fn next_worse(self) -> Self
Get the next worse degradation level.
Returns Critical if already at Critical.
Sourcepub fn next_better(self) -> Self
pub fn next_better(self) -> Self
Get the next better degradation level.
Returns Normal if already at Normal.
Trait Implementations§
Source§impl Clone for DegradationLevel
impl Clone for DegradationLevel
Source§fn clone(&self) -> DegradationLevel
fn clone(&self) -> DegradationLevel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DegradationLevel
impl Debug for DegradationLevel
Source§impl Ord for DegradationLevel
impl Ord for DegradationLevel
Source§fn cmp(&self, other: &DegradationLevel) -> Ordering
fn cmp(&self, other: &DegradationLevel) -> Ordering
1.21.0 · 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 PartialEq for DegradationLevel
impl PartialEq for DegradationLevel
Source§impl PartialOrd for DegradationLevel
impl PartialOrd for DegradationLevel
impl Copy for DegradationLevel
impl Eq for DegradationLevel
impl StructuralPartialEq for DegradationLevel
Auto Trait Implementations§
impl Freeze for DegradationLevel
impl RefUnwindSafe for DegradationLevel
impl Send for DegradationLevel
impl Sync for DegradationLevel
impl Unpin for DegradationLevel
impl UnwindSafe for DegradationLevel
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.