pub enum GuardRootState {
Indexing,
Current,
Dirty,
Blocked,
Degraded,
StalePolicy,
Stopped,
}Expand description
The explicit state of one registered guard root.
Adding a variant here MUST be accompanied by:
- A transition decision in
GuardRootState::transition. - An exit-code mapping in the CLI exit module.
- A status/documentation table entry.
The state-matrix test fails until all three are recorded.
Variants§
Indexing
Initial reconciliation or requested full repair is running.
Current
Baseline completed, all accepted events through the receipt sequence were processed, policy identity matches, and no unresolved finding exists. Background state alone is still insufficient to authorize a commit; an exact staged transaction is required.
Dirty
Accepted filesystem events are queued or scanning.
Blocked
At least one current file or staged blob produced an unsuppressed finding.
Degraded
Event loss, source gap, unreadable input, queue overflow, root replacement, mount discontinuity, or persistence failure prevents complete coverage.
StalePolicy
Binary, detector, suppression, preprocessing, schema, or resolved configuration identity differs from persisted attestations.
Stopped
Root is registered but not actively watched.
Implementations§
Source§impl GuardRootState
impl GuardRootState
Whether this state permits a commit authorization.
This is always false for background states. The exact staged
transaction is the only local commit authorization input.
Sourcepub fn needs_repair(self) -> bool
pub fn needs_repair(self) -> bool
Whether this state indicates the root needs explicit repair action.
Sourcepub fn all() -> &'static [GuardRootState]
pub fn all() -> &'static [GuardRootState]
All variants in declaration order, for exhaustive test derivation.
Source§impl GuardRootState
impl GuardRootState
Sourcepub fn transition(
self,
event: &GuardTransition,
) -> Result<GuardRootState, TransitionError>
pub fn transition( self, event: &GuardTransition, ) -> Result<GuardRootState, TransitionError>
Apply one transition event, returning the new state or an error.
This is the SINGLE owner of the transition function. Every legal transition is enumerated here; anything not listed is rejected. Adding a state or event without updating this function and its tests is a compile-time or test-time failure.
Trait Implementations§
Source§impl Clone for GuardRootState
impl Clone for GuardRootState
Source§fn clone(&self) -> GuardRootState
fn clone(&self) -> GuardRootState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GuardRootState
Source§impl Debug for GuardRootState
impl Debug for GuardRootState
Source§impl<'de> Deserialize<'de> for GuardRootState
impl<'de> Deserialize<'de> for GuardRootState
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>,
Source§impl Display for GuardRootState
impl Display for GuardRootState
impl Eq for GuardRootState
Source§impl Hash for GuardRootState
impl Hash for GuardRootState
Source§impl PartialEq for GuardRootState
impl PartialEq for GuardRootState
Source§impl Serialize for GuardRootState
impl Serialize for GuardRootState
impl StructuralPartialEq for GuardRootState
Auto Trait Implementations§
impl Freeze for GuardRootState
impl RefUnwindSafe for GuardRootState
impl Send for GuardRootState
impl Sync for GuardRootState
impl Unpin for GuardRootState
impl UnsafeUnpin for GuardRootState
impl UnwindSafe for GuardRootState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more