Skip to main content

VerifiedBinding

Struct VerifiedBinding 

Source
pub struct VerifiedBinding { /* private fields */ }
Expand description

A binding whose signature, pass, issuer, holder, audience, lifetime, grant log and ancestry were checked against one verified pass.

Implementations§

Source§

impl VerifiedBinding

Source

pub fn verify( binding: &str, token: &str, pass: &VerifiedPass, keys: &KeySet, log: &GrantLog, ) -> Result<Self, Error>

Verify binding as the binding of the pass token, already verified as pass, on the grant log log the product’s stream reads.

§Errors

Refuses a binding whose encoding, header, signing key or signature does not verify, or whose claims do not match this pass, grant log and grants. An unsupported version or malformed dependency ancestry is refused by the same checks as Self::verify_bound.

Source

pub fn verify_bound( binding: &str, bound: &Bound<'_>, keys: &KeySet, log: &GrantLog, ) -> Result<Self, Error>

Verify binding as the binding of a pass bound describes: one a registry-owned producer issued and verified by its own contract, whose binding Lys judged (POST /grants/bindings).

§Errors

Refuses unreadable token encoding or claims, an unsupported header, an unpublished signing key or an invalid signature. Binding refusals name an unsupported version, a different pass or its issuer, holder, audience or lifetime, or another grant log or epoch. Ancestry is refused when a path does not begin at its grant, contains an empty or repeated grant, repeats a dependency, or does not cover exactly the grants bound names.

Source

pub const fn claims(&self) -> &BindingClaims

The verified claims.

Source

pub const fn revision(&self) -> u64

The revision a product’s stream must stand at before admitting.

Source

pub fn dependency(&self, grant: &str) -> Option<&Dependency>

The dependency of the right resting on grant, as a decision of the pass names it.

Trait Implementations§

Source§

impl Debug for VerifiedBinding

Source§

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

Formats the value using the given formatter. Read more

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> 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, 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.