pub struct ControlGate { /* private fields */ }Expand description
Policy + optional authorizer + shared counters for wire controls.
Implementations§
Source§impl ControlGate
impl ControlGate
Sourcepub fn permissive() -> Self
pub fn permissive() -> Self
Gate that admits every protected control (no authorizer).
Sourcepub fn new(policy: ControlPolicy, authorizer: Option<ControlAuthorizer>) -> Self
pub fn new(policy: ControlPolicy, authorizer: Option<ControlAuthorizer>) -> Self
Gate with an explicit policy and optional authorizer; a present authorizer decides every
protected control regardless of policy.
Sourcepub fn policy(&self) -> ControlPolicy
pub fn policy(&self) -> ControlPolicy
Configured policy mode.
Sourcepub fn snapshot(&self) -> ControlDecisionCounters
pub fn snapshot(&self) -> ControlDecisionCounters
Snapshot of the allow/deny totals recorded by this gate.
Trait Implementations§
Source§impl Debug for ControlGate
impl Debug for ControlGate
Auto Trait Implementations§
impl !Freeze for ControlGate
impl !RefUnwindSafe for ControlGate
impl !UnwindSafe for ControlGate
impl Send for ControlGate
impl Sync for ControlGate
impl Unpin for ControlGate
impl UnsafeUnpin for ControlGate
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