pub struct CombinedScan<'r, L: Language> { /* private fields */ }Expand description
A struct to group all rules according to their potential kinds. This can greatly reduce traversal times and skip unmatchable rules. Rules are referenced by their index in the rules vector.
Implementations§
Source§impl<'r, L: Language> CombinedScan<'r, L>
impl<'r, L: Language> CombinedScan<'r, L>
pub fn new(rules: Vec<&'r RuleConfig<L>>) -> Self
pub fn set_unused_suppression_rule(&mut self, rule: &'r RuleConfig<L>)
pub fn scan<'a, D>(
&self,
root: &'a AstGrep<D>,
separate_fix: bool,
) -> ScanResult<'a, '_, D, L>where
D: Doc<Lang = L>,
pub fn get_rule(&self, idx: usize) -> &'r RuleConfig<L>
pub fn unused_config(severity: Severity, lang: L) -> RuleConfig<L>
Auto Trait Implementations§
impl<'r, L> Freeze for CombinedScan<'r, L>
impl<'r, L> RefUnwindSafe for CombinedScan<'r, L>where
L: RefUnwindSafe,
impl<'r, L> Send for CombinedScan<'r, L>where
L: Sync,
impl<'r, L> Sync for CombinedScan<'r, L>where
L: Sync,
impl<'r, L> Unpin for CombinedScan<'r, L>
impl<'r, L> UnwindSafe for CombinedScan<'r, L>where
L: RefUnwindSafe,
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