pub struct Capability {Show 14 fields
pub operation: Operation,
pub locus: Locus,
pub scale: Scale,
pub retrieval: RetrievalGranularity,
pub authority: Authority,
pub isolation: Isolation,
pub reversibility: Reversibility,
pub persistence: Persistence,
pub disclosure: Disclosure,
pub secret: Secret,
pub network: Network,
pub execution: Execution,
pub cost: Cost,
pub because: String,
}Expand description
One capability — a single point in facet-space (v1.4 §2.8). Facets left unset
default to their zero term. because cites the discriminator (§5); the nested
delegate profile and supply-chain sub-facets arrive with the mechanisms that
need them.
Fields§
§operation: Operation§locus: Locus§scale: Scale§retrieval: RetrievalGranularity§isolation: Isolation§reversibility: Reversibility§persistence: Persistence§disclosure: Disclosure§secret: Secret§network: Network§execution: Execution§cost: Cost§because: StringImplementations§
Source§impl Capability
impl Capability
Sourcepub fn new(operation: Operation) -> Self
pub fn new(operation: Operation) -> Self
A capability performing operation, every other facet at its zero term.
Sourcepub fn set_facets(&self) -> Vec<(&'static str, &'static str)>
pub fn set_facets(&self) -> Vec<(&'static str, &'static str)>
The facets this capability actually SETS, as (dotted name, term) pairs.
Only non-default terms: a capability is a point in 27-dimensional space and almost all of
those dimensions sit at their zero term, so printing every one buries the four or five that
characterize it. because carries the prose; this carries the point.
Sourcepub fn worst(because: impl Into<String>) -> Self
pub fn worst(because: impl Into<String>) -> Self
A maximally-severe capability — every axis at its declared hazard, so no level whose job
is to deny admits it. yolo DOES admit it, which is that level’s whole meaning: a user who
selects “auto-approve everything” has opted out of the question this sentinel answers.
Derived from FacetTerm::hazard rather than hand-written. The hand-written version drifted
on two axes — persistence.trigger.kind sat at none (“not recurring”, the BENIGN case)
and the supply chain was absent, which satisfies every supply-chain constraint vacuously on
an allow clause. Neither was exploitable, because the denial rested on locus.local = kernel; that it rested on a single axis at all is what
the_sentinel_is_denied_even_with_any_one_axis_relaxed now forbids.
The resolver returns this when it cannot certify something (§0), keeping the
engine from being looser than a strict classifier on a form it doesn’t
understand. Ordinal worsts are the ladder tops; categorical worsts are the
hazardous term (Channel::Unknown, Principal::Cross).
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 moreSource§impl Debug for Capability
impl Debug for Capability
Source§impl Default for Capability
impl Default for Capability
Source§fn default() -> Capability
fn default() -> Capability
impl Eq for Capability
Source§impl Hash for Capability
impl Hash for Capability
Source§impl PartialEq for Capability
impl PartialEq for Capability
impl StructuralPartialEq for Capability
Auto Trait Implementations§
impl Freeze for Capability
impl RefUnwindSafe for Capability
impl Send for Capability
impl Sync for Capability
impl Unpin for Capability
impl UnsafeUnpin for Capability
impl UnwindSafe for Capability
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,
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.