pub struct CargoSpec { /* private fields */ }Expand description
Subcommand-aware cargo evaluator.
Evaluation order:
- Safe subcommands → ALLOW (with redirection escalation)
- Env-gated subcommands → ALLOW if all
config_enventries match, else ASK --version/-V→ ALLOW- Everything else → ASK
Implementations§
Source§impl CargoSpec
impl CargoSpec
Sourcepub fn from_config(config: &CargoConfig) -> Self
pub fn from_config(config: &CargoConfig) -> Self
Build a cargo spec from configuration.
Trait Implementations§
Source§impl CommandSpec for CargoSpec
impl CommandSpec for CargoSpec
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 CargoSpec
impl RefUnwindSafe for CargoSpec
impl Send for CargoSpec
impl Sync for CargoSpec
impl Unpin for CargoSpec
impl UnsafeUnpin for CargoSpec
impl UnwindSafe for CargoSpec
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