pub struct CommandPolicy { /* private fields */ }Implementations§
Source§impl CommandPolicy
impl CommandPolicy
pub fn new() -> Self
pub fn allow_executable(self, executable: impl Into<String>) -> Self
pub fn deny_executable(self, executable: impl Into<String>) -> Self
pub fn allow_cwd(self, cwd: impl Into<PathBuf>) -> Self
pub fn deny_env_key(self, key: impl Into<String>) -> Self
pub fn require_approval_for_unknown(self, value: bool) -> Self
Trait Implementations§
Source§impl Default for CommandPolicy
impl Default for CommandPolicy
Source§impl PermissionPolicy for CommandPolicy
impl PermissionPolicy for CommandPolicy
fn evaluate(&self, request: &dyn PermissionRequest) -> PolicyMatch
Auto Trait Implementations§
impl Freeze for CommandPolicy
impl RefUnwindSafe for CommandPolicy
impl Send for CommandPolicy
impl Sync for CommandPolicy
impl Unpin for CommandPolicy
impl UnsafeUnpin for CommandPolicy
impl UnwindSafe for CommandPolicy
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