pub struct ExecutionPermit { /* private fields */ }Expand description
Compiled permit. Fields are private; only super::AuthorityOwner issues it.
Implementations§
Source§impl ExecutionPermit
impl ExecutionPermit
Sourcepub const fn operation(self) -> OperationId
pub const fn operation(self) -> OperationId
Operation ID.
Sourcepub const fn principal(self) -> StrongDigest
pub const fn principal(self) -> StrongDigest
Principal digest.
Sourcepub const fn recipient(self) -> StrongDigest
pub const fn recipient(self) -> StrongDigest
Recipient digest.
Sourcepub const fn purpose(self) -> StrongDigest
pub const fn purpose(self) -> StrongDigest
Purpose digest.
Sourcepub const fn instrument(self) -> StrongDigest
pub const fn instrument(self) -> StrongDigest
Instrument digest.
Sourcepub const fn policy_generation(self) -> Generation
pub const fn policy_generation(self) -> Generation
Policy generation.
Sourcepub const fn identity_generation(self) -> Generation
pub const fn identity_generation(self) -> Generation
Identity generation.
Sourcepub const fn expires_unix(self) -> u64
pub const fn expires_unix(self) -> u64
Expiry epoch.
Sourcepub const fn resource_ceiling(self) -> u64
pub const fn resource_ceiling(self) -> u64
Resource ceiling.
Sourcepub fn current_at(&self, now_unix: u64) -> Result<(), QdnfError>
pub fn current_at(&self, now_unix: u64) -> Result<(), QdnfError>
Ok(()) when the permit is current at now_unix.
Sourcepub fn matches_contact(
&self,
contact: &AuthorisedContact,
) -> Result<(), QdnfError>
pub fn matches_contact( &self, contact: &AuthorisedContact, ) -> Result<(), QdnfError>
Ok when contact matches the permitted contact; QdnfError otherwise.
Sourcepub fn matches_credential(
&self,
cred: &VerifiedCredential,
) -> Result<(), QdnfError>
pub fn matches_credential( &self, cred: &VerifiedCredential, ) -> Result<(), QdnfError>
Ok when cred matches the permitted credential.
Sourcepub fn matches_grant(
&self,
grant: &TemporalGrant,
now_unix: u64,
) -> Result<(), QdnfError>
pub fn matches_grant( &self, grant: &TemporalGrant, now_unix: u64, ) -> Result<(), QdnfError>
Ok when grant is within the permit’s temporal window at now_unix.
Sourcepub fn matches_handle(&self, handle: &MutationHandle) -> Result<(), QdnfError>
pub fn matches_handle(&self, handle: &MutationHandle) -> Result<(), QdnfError>
Ok when handle matches the permitted mutation handle.
Sourcepub fn require_keys(&self, keys: &InstalledSessionKeys) -> Result<(), QdnfError>
pub fn require_keys(&self, keys: &InstalledSessionKeys) -> Result<(), QdnfError>
Ok when keys satisfy the permit’s session-key requirement.
Trait Implementations§
Source§impl Clone for ExecutionPermit
impl Clone for ExecutionPermit
impl Copy for ExecutionPermit
Source§impl Debug for ExecutionPermit
impl Debug for ExecutionPermit
impl Eq for ExecutionPermit
Source§impl PartialEq for ExecutionPermit
impl PartialEq for ExecutionPermit
impl StructuralPartialEq for ExecutionPermit
Auto Trait Implementations§
impl Freeze for ExecutionPermit
impl RefUnwindSafe for ExecutionPermit
impl Send for ExecutionPermit
impl Sync for ExecutionPermit
impl Unpin for ExecutionPermit
impl UnsafeUnpin for ExecutionPermit
impl UnwindSafe for ExecutionPermit
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more