#[non_exhaustive]pub enum KeyReason {
Suspension,
Application,
Withdrawal,
Restore,
}Expand description
A reason an application key is disabled. A key is enabled when it has none and is not destroyed.
§Examples
use stratum_node_core::KeyReason;
let reasons = vec![KeyReason::Suspension, KeyReason::Restore];
assert_eq!(serde_json::to_string(&reasons)?, r#"["suspension","restore"]"#);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.
Suspension
The owner is suspended.
Application
The application was disabled.
Withdrawal
The installation was withdrawn.
Restore
The keystore was restored; the owner’s resume removes it.
Implementations§
Trait Implementations§
impl Copy for KeyReason
Source§impl<'de> Deserialize<'de> for KeyReason
impl<'de> Deserialize<'de> for KeyReason
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for KeyReason
Source§impl Ord for KeyReason
impl Ord for KeyReason
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 PartialOrd for KeyReason
impl PartialOrd for KeyReason
impl StructuralPartialEq for KeyReason
Auto Trait Implementations§
impl Forget for KeyReason
impl Freeze for KeyReason
impl Move for KeyReason
impl RefUnwindSafe for KeyReason
impl Send for KeyReason
impl Sync for KeyReason
impl Unpin for KeyReason
impl UnsafeUnpin for KeyReason
impl UnwindSafe for KeyReason
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