pub struct CapabilityLedger { /* private fields */ }Implementations§
Source§impl CapabilityLedger
impl CapabilityLedger
pub fn entries(&self) -> &[CapabilityLedgerEntry]
pub fn request( &mut self, capability: Capability, scope: CapabilityScope, at_ms: u64, )
pub fn grant( &mut self, capability: Capability, scope: CapabilityScope, justification: impl Into<String>, expires_at_ms: Option<u64>, at_ms: u64, explicit_user_approval: bool, ) -> bool
pub fn consume( &mut self, capability: &Capability, scope: &CapabilityScope, call_id: &str, at_ms: u64, ) -> bool
Trait Implementations§
Source§impl Clone for CapabilityLedger
impl Clone for CapabilityLedger
Source§fn clone(&self) -> CapabilityLedger
fn clone(&self) -> CapabilityLedger
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 CapabilityLedger
impl Debug for CapabilityLedger
Source§impl Default for CapabilityLedger
impl Default for CapabilityLedger
Source§fn default() -> CapabilityLedger
fn default() -> CapabilityLedger
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CapabilityLedger
impl<'de> Deserialize<'de> for CapabilityLedger
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
Auto Trait Implementations§
impl Freeze for CapabilityLedger
impl RefUnwindSafe for CapabilityLedger
impl Send for CapabilityLedger
impl Sync for CapabilityLedger
impl Unpin for CapabilityLedger
impl UnsafeUnpin for CapabilityLedger
impl UnwindSafe for CapabilityLedger
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