pub struct Commands {
pub allow: Vec<String>,
pub ask: Vec<String>,
pub deny: Vec<String>,
}Expand description
Flat command name → decision mappings for simple commands.
Commands in allow run silently, ask prompts the user, deny blocks outright.
Unrecognized commands default to ASK.
Fields§
§allow: Vec<String>Commands that run silently (e.g. ls, cat, grep).
ask: Vec<String>Commands that require user confirmation (e.g. rm, curl, pip).
deny: Vec<String>Commands that are blocked outright (e.g. shred, dd, mkfs).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Commands
impl<'de> Deserialize<'de> for Commands
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnsafeUnpin for Commands
impl UnwindSafe for Commands
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