pub struct CommandRegistry { /* private fields */ }Expand description
Registry of all command specs, keyed by command name.
Built from Config via from_config.
Handles single-command evaluation, compound command decomposition,
wrapper command unwrapping, substitution evaluation, and decision aggregation.
Implementations§
Source§impl CommandRegistry
impl CommandRegistry
Sourcepub fn from_config(config: &Config) -> Self
pub fn from_config(config: &Config) -> Self
Build the registry from configuration.
Sourcepub fn set_escalate_deny(&mut self, escalate: bool)
pub fn set_escalate_deny(&mut self, escalate: bool)
Override the escalate_deny setting (e.g. from –escalate-deny CLI flag).
Sourcepub fn evaluate_single(&self, command: &str) -> RuleMatch
pub fn evaluate_single(&self, command: &str) -> RuleMatch
Evaluate a single (non-compound) command against the registry.
Auto Trait Implementations§
impl Freeze for CommandRegistry
impl !RefUnwindSafe for CommandRegistry
impl Send for CommandRegistry
impl Sync for CommandRegistry
impl Unpin for CommandRegistry
impl UnsafeUnpin for CommandRegistry
impl !UnwindSafe for CommandRegistry
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