#[non_exhaustive]pub enum InstallationState {
PendingConsent,
Active,
Withdrawn,
Removed,
}Expand description
An installation’s state. withdrawn and removed are terminal.
§Examples
use stratum_node_core::InstallationState;
assert_eq!("pending_consent".parse::<InstallationState>()?, InstallationState::PendingConsent);
assert!(InstallationState::Removed.is_terminal());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.
PendingConsent
Made, with its key; waiting for the member’s consent.
Active
Consented: its key is enabled and jobs run.
Withdrawn
Withdrawn by the member.
Removed
The member was removed.
Implementations§
Source§impl InstallationState
impl InstallationState
Sourcepub fn is_terminal(self) -> bool
pub fn is_terminal(self) -> bool
Returns true for withdrawn and removed.
Trait Implementations§
Source§impl Clone for InstallationState
impl Clone for InstallationState
impl Copy for InstallationState
Source§impl Debug for InstallationState
impl Debug for InstallationState
Source§impl<'de> Deserialize<'de> for InstallationState
impl<'de> Deserialize<'de> for InstallationState
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
Source§impl Display for InstallationState
impl Display for InstallationState
impl Eq for InstallationState
Source§impl FromStr for InstallationState
impl FromStr for InstallationState
Source§impl Hash for InstallationState
impl Hash for InstallationState
Source§impl Ord for InstallationState
impl Ord for InstallationState
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 InstallationState
impl PartialEq for InstallationState
Source§impl PartialOrd for InstallationState
impl PartialOrd for InstallationState
Source§impl Serialize for InstallationState
impl Serialize for InstallationState
impl StructuralPartialEq for InstallationState
Auto Trait Implementations§
impl Forget for InstallationState
impl Freeze for InstallationState
impl Move for InstallationState
impl RefUnwindSafe for InstallationState
impl Send for InstallationState
impl Sync for InstallationState
impl Unpin for InstallationState
impl UnsafeUnpin for InstallationState
impl UnwindSafe for InstallationState
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