#[repr(C)]pub struct PrincipalAndAgentGrant {
pub human_principal_did_hash: u64,
pub agent_did_hash: u64,
pub authorized_context_hash: u64,
pub max_sensitivity_class: u8,
pub allow_derivative_export: bool,
pub allow_explanation_trace: bool,
pub issued_epoch: u64,
pub expiry_epoch: u64,
pub revoked: bool,
}Expand description
Scoped grant binding a human principal and an optional delegated agent.
Direct human action sets agent_did_hash = 0. Delegated action sets agent_did_hash != 0.
Missing human principal (human_principal_did_hash = 0) is always denied (AUTH-H1..H6).
Fields§
§human_principal_did_hash: u64§agent_did_hash: u64§max_sensitivity_class: u8§allow_derivative_export: bool§allow_explanation_trace: bool§issued_epoch: u64§expiry_epoch: u64§revoked: boolImplementations§
Source§impl PrincipalAndAgentGrant
impl PrincipalAndAgentGrant
pub const fn direct_human( human: u64, ctx: u64, sens: u8, issued: u64, expiry: u64, ) -> Self
pub const fn delegated_agent( human: u64, agent: u64, ctx: u64, sens: u8, deriv: bool, trace: bool, issued: u64, expiry: u64, ) -> Self
pub const fn is_direct_human(&self) -> bool
pub const fn is_delegated_agent(&self) -> bool
Trait Implementations§
Source§impl Clone for PrincipalAndAgentGrant
impl Clone for PrincipalAndAgentGrant
impl Copy for PrincipalAndAgentGrant
Source§impl Debug for PrincipalAndAgentGrant
impl Debug for PrincipalAndAgentGrant
impl Eq for PrincipalAndAgentGrant
Source§impl PartialEq for PrincipalAndAgentGrant
impl PartialEq for PrincipalAndAgentGrant
impl StructuralPartialEq for PrincipalAndAgentGrant
Auto Trait Implementations§
impl Freeze for PrincipalAndAgentGrant
impl RefUnwindSafe for PrincipalAndAgentGrant
impl Send for PrincipalAndAgentGrant
impl Sync for PrincipalAndAgentGrant
impl Unpin for PrincipalAndAgentGrant
impl UnsafeUnpin for PrincipalAndAgentGrant
impl UnwindSafe for PrincipalAndAgentGrant
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