pub struct Delegation { /* private fields */ }Expand description
Delegation from one subject to another under a capability reference.
Implementations§
Source§impl Delegation
impl Delegation
Sourcepub fn new(
statement_id: StatementId,
from_subject: SubjectId,
to_subject: SubjectId,
capability: CapabilityRef,
) -> Result<Self, ValidationError>
pub fn new( statement_id: StatementId, from_subject: SubjectId, to_subject: SubjectId, capability: CapabilityRef, ) -> Result<Self, ValidationError>
Creates a delegation body from required fields.
Sourcepub const fn kind(&self) -> StatementKind
pub const fn kind(&self) -> StatementKind
Returns this body kind.
Sourcepub const fn statement_id(&self) -> &StatementId
pub const fn statement_id(&self) -> &StatementId
Returns the delegation statement identifier.
Sourcepub const fn from_subject(&self) -> &SubjectId
pub const fn from_subject(&self) -> &SubjectId
Returns the delegating subject.
Sourcepub const fn to_subject(&self) -> &SubjectId
pub const fn to_subject(&self) -> &SubjectId
Returns the delegated subject.
Sourcepub const fn capability(&self) -> CapabilityRef
pub const fn capability(&self) -> CapabilityRef
Returns the delegated capability reference.
Trait Implementations§
Source§impl Debug for Delegation
impl Debug for Delegation
impl Eq for Delegation
Source§impl PartialEq for Delegation
impl PartialEq for Delegation
Source§fn eq(&self, other: &Delegation) -> bool
fn eq(&self, other: &Delegation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Delegation
Auto Trait Implementations§
impl Freeze for Delegation
impl RefUnwindSafe for Delegation
impl Send for Delegation
impl Sync for Delegation
impl Unpin for Delegation
impl UnsafeUnpin for Delegation
impl UnwindSafe for Delegation
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