pub struct PolicyEngine { /* private fields */ }Implementations§
Source§impl PolicyEngine
impl PolicyEngine
pub fn new(mode: SafetyMode) -> Self
Sourcepub const fn with_host_shell(self, host_shell: HostShell) -> Self
pub const fn with_host_shell(self, host_shell: HostShell) -> Self
Override the shell dialect commands are classified for. Tests use
this to exercise both dialects on every platform; production callers
keep the HostShell::current default, which matches what
shell_invocation actually spawns.
pub fn with_overrides(self, overrides: Vec<PolicyOverride>) -> Self
pub fn with_external_writes(self, level: FloorLevel) -> Self
pub fn with_system_installs(self, level: FloorLevel) -> Self
pub fn decide(&self, request: &ActionRequest) -> PolicyDecision
Trait Implementations§
Source§impl Clone for PolicyEngine
impl Clone for PolicyEngine
Source§fn clone(&self) -> PolicyEngine
fn clone(&self) -> PolicyEngine
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 moreAuto Trait Implementations§
impl Freeze for PolicyEngine
impl RefUnwindSafe for PolicyEngine
impl Send for PolicyEngine
impl Sync for PolicyEngine
impl Unpin for PolicyEngine
impl UnsafeUnpin for PolicyEngine
impl UnwindSafe for PolicyEngine
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