pub enum CanonResult {
Ok(Vec<CanonSubcommand>),
Unparseable(String),
}Expand description
The result of canonicalize: either a flat list of every sub-command
found (top-level compounds, and every command nested inside a
$(...)/backtick substitution anywhere in the tree — see the module doc
for why a single recursive command-node walk is sufficient to find
both), or a fail-closed reason a caller must treat as REQUIRING approval.
Variants§
Ok(Vec<CanonSubcommand>)
Parsed cleanly. Never empty when the input was non-blank (see
canonicalize’s doc comment on the empty-input case).
Unparseable(String)
Did not parse cleanly (a tree-sitter ERROR/MISSING node, unbalanced
input, or the MAX_SUBCOMMANDS/MAX_WRAPPER_UNWRAPS safety caps
were exceeded). Carries a short human-readable reason. Callers MUST
treat this as requiring approval — never auto-allow.
Trait Implementations§
Source§impl Clone for CanonResult
impl Clone for CanonResult
Source§fn clone(&self) -> CanonResult
fn clone(&self) -> CanonResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CanonResult
impl Debug for CanonResult
impl Eq for CanonResult
Source§impl PartialEq for CanonResult
impl PartialEq for CanonResult
impl StructuralPartialEq for CanonResult
Auto Trait Implementations§
impl Freeze for CanonResult
impl RefUnwindSafe for CanonResult
impl Send for CanonResult
impl Sync for CanonResult
impl Unpin for CanonResult
impl UnsafeUnpin for CanonResult
impl UnwindSafe for CanonResult
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.