pub struct Policy { /* private fields */ }Expand description
A file-configured admission hook. Line format (# starts a comment):
default deny # decision when no rule matches (required)
allow capture # any capture
allow input click # only click among input effects
deny * * # explicit catch-allKinds: navigate input action script capture process command or *.
The first matching rule wins; otherwise default decides. A policy with
no default line is rejected, so there is no implicit allow.
Implementations§
Trait Implementations§
Source§impl AdmissionHook for Policy
impl AdmissionHook for Policy
Source§fn approve(&self, r: &EffectRequest) -> AdmissionDecision
fn approve(&self, r: &EffectRequest) -> AdmissionDecision
Approve or deny. Called only after validation passed.
impl Eq for Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnsafeUnpin for Policy
impl UnwindSafe for Policy
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