pub enum SourceValidityV1 {
Valid,
RevalidateRequired,
Stale,
Revoked,
Deleted,
Unavailable,
Unsupported,
}Expand description
State of a source candidate at decision time. Exactly one of these, from
the source’s own re-check; only valid may be materialized.
Variants§
Valid
RevalidateRequired
The authority or policy changed since it was last checked; ask again.
Stale
Readable, but not the revision the stored copy was derived from.
Revoked
The principal or team lost the right to read it.
Deleted
The source could not answer (timeout, rate limit, outage).
Unsupported
The source cannot re-check this item (no ACL semantics or no binding).
Implementations§
Source§impl SourceValidityV1
impl SourceValidityV1
pub fn permits_materialization(self) -> bool
Sourcepub fn reason_code(self) -> &'static str
pub fn reason_code(self) -> &'static str
The stable reason code of a non-valid state.
Sourcepub fn from_reason_code(code: &str) -> Option<Self>
pub fn from_reason_code(code: &str) -> Option<Self>
The state the existing reason-code families already express (adapters for stored copies, recovery/presenter lineage and team artifacts). An unknown code is not a state.
Trait Implementations§
Source§impl Clone for SourceValidityV1
impl Clone for SourceValidityV1
impl Copy for SourceValidityV1
Source§impl Debug for SourceValidityV1
impl Debug for SourceValidityV1
Source§impl<'de> Deserialize<'de> for SourceValidityV1
impl<'de> Deserialize<'de> for SourceValidityV1
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SourceValidityV1
Source§impl Hash for SourceValidityV1
impl Hash for SourceValidityV1
Source§impl PartialEq for SourceValidityV1
impl PartialEq for SourceValidityV1
Source§impl Serialize for SourceValidityV1
impl Serialize for SourceValidityV1
impl StructuralPartialEq for SourceValidityV1
Auto Trait Implementations§
impl Forget for SourceValidityV1
impl Freeze for SourceValidityV1
impl Move for SourceValidityV1
impl RefUnwindSafe for SourceValidityV1
impl Send for SourceValidityV1
impl Sync for SourceValidityV1
impl Unpin for SourceValidityV1
impl UnsafeUnpin for SourceValidityV1
impl UnwindSafe for SourceValidityV1
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