Skip to main content

RoleReadiness

Enum RoleReadiness 

Source
pub enum RoleReadiness {
    NotReady,
    Unknown,
    Unverifiable,
    Known(Binding),
}
Expand description

Whether one signing role can sign, as far as this session can tell.

Two unknowns live here and they must never share a variant (RFC 026 §3). Self::Unknown grants the capability with a caveat rendered; Self::Unverifiable withholds it and says so. A single variant that sometimes did each is the shape C-T2c′ exists to forbid.

Variants§

§

NotReady

No key material this session can use. At ≤ 0.39 the variables are absent; at ≥ 0.41 prikk said usable: false, and its own reason travels separately for display (ER-02).

§

Unknown

Key material is present, and whether it binds is unanswerable on this prikk — the ≤ 0.39 band, where binding does not exist. Grants, with the caveat rendered: RFC 016’s rule is to offer the action and let prikk refuse, never to render the caveat as a pass.

§

Unverifiable

prikk 0.40 exactly: stikk cannot see whether there is key material at all. 0.40 moved seeds to a key directory and shipped no way to ask about them, so presence-in-the-environment stopped being an answer and nothing replaced it until 0.41. Withholds, and the UI says unknown rather than not ready — Q1(b), ruled: honest and actionable beats confident and wrong.

§

Known(Binding)

prikk answered (≥ 0.41).

Implementations§

Source§

impl RoleReadiness

Source

pub const fn arms(self) -> bool

Whether this state arms the role’s operations.

The one place the grant/withhold split is decided, so a caller cannot re-derive it differently.

Trait Implementations§

Source§

impl Clone for RoleReadiness

Source§

fn clone(&self) -> RoleReadiness

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 Copy for RoleReadiness

Source§

impl Debug for RoleReadiness

Source§

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

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

impl Eq for RoleReadiness

Source§

impl PartialEq for RoleReadiness

Source§

fn eq(&self, other: &RoleReadiness) -> 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 RoleReadiness

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<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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.