pub enum Capability {
Viewer,
Author,
Maintainer,
}Expand description
What a session may do, derived from Readiness (design AC-01…04).
The levels are cumulative for the mutating axis (Maintainer implies Author implies Viewer).
Operator is orthogonal — recovery actions available to any human at the machine under explicit
confirmation — and is represented as a separate query (Capability::may_operate) rather than a
point on the ladder.
Variants§
Viewer
Every read surface. The default when signing readiness is absent or read-only mode is on.
Author
Viewer plus queue-affecting operations: commit, rollback draft.
Maintainer
Author plus history-publishing: seal, merge execution, ref/tag publication, trust changes.
Implementations§
Source§impl Capability
impl Capability
Sourcepub const fn derive(readiness: Readiness) -> Self
pub const fn derive(readiness: Readiness) -> Self
Derive the mutating-axis capability from readiness. Read-only mode collapses everything to
Capability::Viewer regardless of key presence (design NFR-S01).
True when this capability permits queue-affecting operations (commit, rollback draft).
Sourcepub const fn may_publish(self) -> bool
pub const fn may_publish(self) -> bool
True when this capability permits history-publishing operations (seal, merge, publication, trust changes).
Sourcepub const fn may_operate(self) -> bool
pub const fn may_operate(self) -> bool
True when a human at the machine may run recovery actions (doctor repair, lock clearing, compaction) under explicit confirmation. Orthogonal to the mutating axis: recovery is not a signing act, it is an operator act, and read-only mode does not remove it (design AC-04) — but each recovery action still carries its own typed confirmation (FR-102).
Trait Implementations§
Source§impl Clone for Capability
impl Clone for Capability
Source§fn clone(&self) -> Capability
fn clone(&self) -> Capability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more