Skip to main content

Capability

Struct Capability 

Source
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§authority: Authority§isolation: Isolation§reversibility: Reversibility§persistence: Persistence§disclosure: Disclosure§secret: Secret§network: Network§execution: Execution§cost: Cost§because: String

Implementations§

Source§

impl Capability

Source

pub fn new(operation: Operation) -> Self

A capability performing operation, every other facet at its zero term.

Source

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.

Source

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

Source§

fn clone(&self) -> Capability

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Capability

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Capability

Source§

fn default() -> Capability

Returns the “default value” for a type. Read more
Source§

impl Eq for Capability

Source§

impl Hash for Capability

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Capability

Source§

fn eq(&self, other: &Capability) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Capability

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.