#[non_exhaustive]pub enum Durability {
Volatile,
Process,
Machine,
}Expand description
How much a stored value survives. Ordered: a higher class includes the lower ones.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Volatile
Lost when the process exits.
Process
Survives the process exiting or crashing; not claimed to survive the machine losing power.
Machine
Documented to survive an operating-system crash or power loss (the write is flushed to stable storage before it is acknowledged).
Implementations§
Trait Implementations§
Source§impl Clone for Durability
impl Clone for Durability
impl Copy for Durability
Source§impl Debug for Durability
impl Debug for Durability
impl Eq for Durability
Source§impl Hash for Durability
impl Hash for Durability
Source§impl Ord for Durability
impl Ord for Durability
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Durability
impl PartialEq for Durability
Source§impl PartialOrd for Durability
impl PartialOrd for Durability
impl StructuralPartialEq for Durability
Auto Trait Implementations§
impl Freeze for Durability
impl RefUnwindSafe for Durability
impl Send for Durability
impl Sync for Durability
impl Unpin for Durability
impl UnsafeUnpin for Durability
impl UnwindSafe for Durability
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