#[non_exhaustive]pub enum ApplicationState {
Approved,
Withdrawn,
Disabled,
}Expand description
An application’s state. disabled is terminal.
§Examples
use stratum_node_core::ApplicationState;
assert_eq!(serde_json::to_string(&ApplicationState::Approved)?, "\"approved\"");
assert!(ApplicationState::Disabled.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.
Approved
New installations may be made.
Withdrawn
No new installations; existing ones keep running.
Disabled
Emergency stop: every installation’s key is disabled for the
reason application and every live lease revoked.
Implementations§
Source§impl ApplicationState
impl ApplicationState
Sourcepub fn is_terminal(self) -> bool
pub fn is_terminal(self) -> bool
Returns true for disabled.
Trait Implementations§
Source§impl Clone for ApplicationState
impl Clone for ApplicationState
impl Copy for ApplicationState
Source§impl Debug for ApplicationState
impl Debug for ApplicationState
Source§impl<'de> Deserialize<'de> for ApplicationState
impl<'de> Deserialize<'de> for ApplicationState
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 ApplicationState
impl Display for ApplicationState
impl Eq for ApplicationState
Source§impl FromStr for ApplicationState
impl FromStr for ApplicationState
Source§impl Hash for ApplicationState
impl Hash for ApplicationState
Source§impl Ord for ApplicationState
impl Ord for ApplicationState
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 ApplicationState
impl PartialEq for ApplicationState
Source§impl PartialOrd for ApplicationState
impl PartialOrd for ApplicationState
Source§impl Serialize for ApplicationState
impl Serialize for ApplicationState
impl StructuralPartialEq for ApplicationState
Auto Trait Implementations§
impl Forget for ApplicationState
impl Freeze for ApplicationState
impl Move for ApplicationState
impl RefUnwindSafe for ApplicationState
impl Send for ApplicationState
impl Sync for ApplicationState
impl Unpin for ApplicationState
impl UnsafeUnpin for ApplicationState
impl UnwindSafe for ApplicationState
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