pub enum Status {
Active,
Superseded,
Expired,
Other(String),
}Expand description
Registry-derived lifecycle status.
The schema (acdp-common.schema.json#/$defs/status) defines an open
^[a-z][a-z0-9_]*$ pattern, length 1..=64. v0.1.0 emits active,
superseded, expired; future versions add retracted
(RFC-ACDP-0009 §2.1) and possibly others. Consumers MUST tolerate
unknown values matching the pattern; values that DO NOT match the
pattern (uppercase, whitespace, empty) are rejected on
deserialization as malformed registry state.
Variants§
Active
First-class, current version of its lineage.
Superseded
Replaced by a later version in the same lineage.
Expired
Past expires_at.
Other(String)
A status string this version of the library does not recognize.
Per the spec, treat as active for read-side decisions until upgrade.
Implementations§
Source§impl Status
impl Status
Sourcepub fn is_superseded(&self) -> bool
pub fn is_superseded(&self) -> bool
Returns true if status is Superseded.
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Returns true if status is Expired.
Sourcepub fn known_or_active(&self) -> Status
pub fn known_or_active(&self) -> Status
Forward-compatible degradation: maps unknown statuses to
Status::Active for functional decisions, per RFC-ACDP-0004 §4.1
(“v0.1.0 consumers MUST tolerate unknown status values and SHOULD
treat them as ‘active’ until they upgrade”). Callers MUST log the
original Other(_) value so the unknown is observable.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Status
impl<'de> Deserialize<'de> for Status
Source§fn deserialize<D>(d: D) -> Result<Status, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<Status, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
impl Eq for Status
Source§impl Serialize for Status
impl Serialize for Status
Source§fn serialize<S>(
&self,
s: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
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
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
key and return true if they are equal.