pub enum WhichResult {
Expanded {
key: String,
expansion: String,
rule_index: usize,
satisfied_conditions: Vec<String>,
skipped: Vec<(usize, SkipReason)>,
},
AllSkipped {
token: String,
skipped: Vec<(usize, SkipReason)>,
},
NoMatch {
token: String,
},
}Expand description
Result of a which lookup — mirrors expand() scan order exactly.
skipped contains every rule that matched the key but was bypassed,
in the same order expand() would skip them. This ensures which_abbr
and expand agree on the final outcome even with duplicate-key rules.
Variants§
Expanded
Token matched a rule and all conditions passed.
Fields
§
skipped: Vec<(usize, SkipReason)>Earlier rules with the same key that were skipped before this one.
AllSkipped
Every matching rule was skipped; here is why each one was bypassed.
NoMatch
No rule had this key at all.
Trait Implementations§
Source§impl Clone for WhichResult
impl Clone for WhichResult
Source§fn clone(&self) -> WhichResult
fn clone(&self) -> WhichResult
Returns a duplicate of the value. Read more
1.0.0 · 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 WhichResult
impl Debug for WhichResult
Source§impl PartialEq for WhichResult
impl PartialEq for WhichResult
impl StructuralPartialEq for WhichResult
Auto Trait Implementations§
impl Freeze for WhichResult
impl RefUnwindSafe for WhichResult
impl Send for WhichResult
impl Sync for WhichResult
impl Unpin for WhichResult
impl UnsafeUnpin for WhichResult
impl UnwindSafe for WhichResult
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