pub struct CapabilityEnforcementContext<'a> { /* private fields */ }Expand description
Runtime context used to authorize one local capability invocation.
Implementations§
Source§impl<'a> CapabilityEnforcementContext<'a>
impl<'a> CapabilityEnforcementContext<'a>
Sourcepub fn new(
identity: &'a CoreIdentity,
service_id: &'a ServiceId,
now_ms: u64,
) -> Self
pub fn new( identity: &'a CoreIdentity, service_id: &'a ServiceId, now_ms: u64, ) -> Self
Creates a context without leadership and with writes enabled.
Sourcepub fn with_leadership(self, leadership: &'a dyn ServiceLeadershipGuard) -> Self
pub fn with_leadership(self, leadership: &'a dyn ServiceLeadershipGuard) -> Self
Supplies the service-scoped leadership guard used for fenced writes.
Sourcepub fn with_writes_allowed(self, writes_allowed: bool) -> Self
pub fn with_writes_allowed(self, writes_allowed: bool) -> Self
Declares whether the host’s current operational mode permits writes.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CapabilityEnforcementContext<'a>
impl<'a> !UnwindSafe for CapabilityEnforcementContext<'a>
impl<'a> Freeze for CapabilityEnforcementContext<'a>
impl<'a> Send for CapabilityEnforcementContext<'a>
impl<'a> Sync for CapabilityEnforcementContext<'a>
impl<'a> Unpin for CapabilityEnforcementContext<'a>
impl<'a> UnsafeUnpin for CapabilityEnforcementContext<'a>
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