#[non_exhaustive]pub enum MemberState {
Reserved,
Provisioned,
Active,
Cancelled,
}Expand description
The state of a tenant’s membership of a node.
The text form is the lowercase name (reserved, provisioned, active,
cancelled), used by Display, FromStr and serde.
§Examples
use stratum_node_core::MemberState;
let state: MemberState = "provisioned".parse()?;
assert_eq!(state, MemberState::Provisioned);
assert_eq!(state.to_string(), "provisioned");
assert!(state.holds_slot());
assert!(!MemberState::Cancelled.holds_slot());
assert!("Active".parse::<MemberState>().is_err());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.
Reserved
The invitation was consumed and a slot is held; the pod is not yet confirmed created.
Provisioned
The pod server created the pod.
Active
The owner stated that a read and a write to their pod worked.
Cancelled
The administrator cancelled a reserved member; no slot is held.
Implementations§
Source§impl MemberState
impl MemberState
Trait Implementations§
Source§impl Clone for MemberState
impl Clone for MemberState
impl Copy for MemberState
Source§impl Debug for MemberState
impl Debug for MemberState
Source§impl<'de> Deserialize<'de> for MemberState
impl<'de> Deserialize<'de> for MemberState
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 MemberState
impl Display for MemberState
impl Eq for MemberState
Source§impl FromStr for MemberState
impl FromStr for MemberState
Source§impl Hash for MemberState
impl Hash for MemberState
Source§impl Ord for MemberState
impl Ord for MemberState
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 MemberState
impl PartialEq for MemberState
Source§impl PartialOrd for MemberState
impl PartialOrd for MemberState
Source§impl Serialize for MemberState
impl Serialize for MemberState
impl StructuralPartialEq for MemberState
Auto Trait Implementations§
impl Forget for MemberState
impl Freeze for MemberState
impl Move for MemberState
impl RefUnwindSafe for MemberState
impl Send for MemberState
impl Sync for MemberState
impl Unpin for MemberState
impl UnsafeUnpin for MemberState
impl UnwindSafe for MemberState
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