pub struct AuthorizationGrant { /* private fields */ }Implementations§
Source§impl AuthorizationGrant
impl AuthorizationGrant
pub fn new( id: AuthorizationGrantId, grantee: PrincipalId, actions: impl IntoIterator<Item = AuthorizationAction>, scope: AuthorizationScope, validity: (OffsetDateTime, Option<OffsetDateTime>), delegation_depth: DelegationDepth, issuer: AuthorizationGrantIssuer, ) -> Result<Self, DomainError>
pub fn id(&self) -> &AuthorizationGrantId
pub fn grantee(&self) -> &PrincipalId
pub fn actions(&self) -> &BTreeSet<AuthorizationAction>
pub const fn scope(&self) -> &AuthorizationScope
pub const fn valid_from(&self) -> OffsetDateTime
pub const fn valid_until(&self) -> Option<OffsetDateTime>
pub const fn delegation_depth(&self) -> DelegationDepth
pub const fn issued_by(&self) -> &AuthenticatedPrincipal
pub const fn parent_grant_id(&self) -> Option<&AuthorizationGrantId>
pub fn is_active_at(&self, now: OffsetDateTime) -> bool
pub fn permits( &self, action: AuthorizationAction, scope: &AuthorizationScope, now: OffsetDateTime, ) -> bool
pub fn validate(&self) -> Result<(), DomainError>
Trait Implementations§
Source§impl Clone for AuthorizationGrant
impl Clone for AuthorizationGrant
Source§impl Debug for AuthorizationGrant
impl Debug for AuthorizationGrant
Source§impl<'de> Deserialize<'de> for AuthorizationGrant
impl<'de> Deserialize<'de> for AuthorizationGrant
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AuthorizationGrant
Source§impl PartialEq for AuthorizationGrant
impl PartialEq for AuthorizationGrant
Source§impl Serialize for AuthorizationGrant
impl Serialize for AuthorizationGrant
impl StructuralPartialEq for AuthorizationGrant
Auto Trait Implementations§
impl Freeze for AuthorizationGrant
impl RefUnwindSafe for AuthorizationGrant
impl Send for AuthorizationGrant
impl Sync for AuthorizationGrant
impl Unpin for AuthorizationGrant
impl UnsafeUnpin for AuthorizationGrant
impl UnwindSafe for AuthorizationGrant
Blanket Implementations§
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