pub struct SimpleCommandSpec { /* private fields */ }Expand description
A data-driven command spec for flat allow/ask commands.
For allow commands: returns Allow unless output redirection is detected (→ Ask).
--version on any allowed command is also allowed.
For ask commands: always returns Ask.
Implementations§
Trait Implementations§
Source§impl CommandSpec for SimpleCommandSpec
impl CommandSpec for SimpleCommandSpec
Source§fn evaluate(&self, ctx: &CommandContext<'_>) -> RuleMatch
fn evaluate(&self, ctx: &CommandContext<'_>) -> RuleMatch
Evaluate the command in the given context and return a decision.
Auto Trait Implementations§
impl Freeze for SimpleCommandSpec
impl RefUnwindSafe for SimpleCommandSpec
impl Send for SimpleCommandSpec
impl Sync for SimpleCommandSpec
impl Unpin for SimpleCommandSpec
impl UnsafeUnpin for SimpleCommandSpec
impl UnwindSafe for SimpleCommandSpec
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