pub struct OperationGrant { /* private fields */ }Expand description
Exact authority presented for one operation.
Implementations§
Source§impl OperationGrant
impl OperationGrant
Sourcepub fn new(
operation: OperationId,
capability: CapabilityName,
authority: Datum,
) -> Result<Self, OperationError>
pub fn new( operation: OperationId, capability: CapabilityName, authority: Datum, ) -> Result<Self, OperationError>
Constructs a grant independently of any writer lease or attempt.
Sourcepub const fn id(&self) -> &OperationGrantId
pub const fn id(&self) -> &OperationGrantId
Returns the grant identity.
Sourcepub const fn operation(&self) -> &OperationId
pub const fn operation(&self) -> &OperationId
Returns the operation this grant can authorize.
Sourcepub const fn capability(&self) -> &CapabilityName
pub const fn capability(&self) -> &CapabilityName
Returns the exact capability recorded by the grant.
Returns the canonical authority evidence supplied by the caller.
Sourcepub fn canonical_datum(&self) -> Datum
pub fn canonical_datum(&self) -> Datum
Returns the grant’s canonical semantic value.
Trait Implementations§
Source§impl Clone for OperationGrant
impl Clone for OperationGrant
Source§fn clone(&self) -> OperationGrant
fn clone(&self) -> OperationGrant
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OperationGrant
impl Debug for OperationGrant
impl Eq for OperationGrant
Source§impl PartialEq for OperationGrant
impl PartialEq for OperationGrant
impl StructuralPartialEq for OperationGrant
Auto Trait Implementations§
impl Freeze for OperationGrant
impl RefUnwindSafe for OperationGrant
impl Send for OperationGrant
impl Sync for OperationGrant
impl Unpin for OperationGrant
impl UnsafeUnpin for OperationGrant
impl UnwindSafe for OperationGrant
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