#[non_exhaustive]pub enum EnrollmentStatus {
Pending,
Approved,
Other(String),
}Expand description
Enrollment status returned in the Enrolled message.
§Wire forward-compatibility
Other(String) is a catch-all for status strings received from a newer
controller that this build does not yet recognise. Serde deserialization
is infallible: an unknown string becomes Other(...) rather than a parse
error, allowing older agents to survive rolling upgrades without dropping
the enclosing Enrolled message.
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.
Pending
Approved
Other(String)
An unknown status received from a newer peer.
The inner string is the raw snake_case value as it appeared on the wire.
Implementations§
Source§impl EnrollmentStatus
impl EnrollmentStatus
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Returns the string representation.
For EnrollmentStatus::Other, returns the inner string as-is.
Trait Implementations§
Source§impl Clone for EnrollmentStatus
impl Clone for EnrollmentStatus
Source§fn clone(&self) -> EnrollmentStatus
fn clone(&self) -> EnrollmentStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EnrollmentStatus
impl Debug for EnrollmentStatus
Source§impl<'de> Deserialize<'de> for EnrollmentStatus
impl<'de> Deserialize<'de> for EnrollmentStatus
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 EnrollmentStatus
impl Display for EnrollmentStatus
impl Eq for EnrollmentStatus
Source§impl From<String> for EnrollmentStatus
impl From<String> for EnrollmentStatus
Source§fn from(s: String) -> Self
fn from(s: String) -> Self
Converts a snake_case string to an enrollment status.
Unknown strings map to EnrollmentStatus::Other rather than failing.
Source§impl PartialEq for EnrollmentStatus
impl PartialEq for EnrollmentStatus
Source§impl Serialize for EnrollmentStatus
impl Serialize for EnrollmentStatus
impl StructuralPartialEq for EnrollmentStatus
Auto Trait Implementations§
impl Freeze for EnrollmentStatus
impl RefUnwindSafe for EnrollmentStatus
impl Send for EnrollmentStatus
impl Sync for EnrollmentStatus
impl Unpin for EnrollmentStatus
impl UnsafeUnpin for EnrollmentStatus
impl UnwindSafe for EnrollmentStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.