[][src]Trait c2rust_refactor::matcher::Pattern

pub trait Pattern<V>: TryMatch + Sized {
    fn visit<'a, 'tcx, T, F>(
        self,
        _init_mcx: MatchCtxt<'a, 'tcx>,
        _callback: F,
        _target: &mut T
    )
    where
        T: MutVisit,
        F: FnMut(&mut V, MatchCtxt<'a, 'tcx>)
, { ... }
fn flat_map<'a, 'tcx, T, F>(
        self,
        _init_mcx: MatchCtxt<'a, 'tcx>,
        _callback: F,
        _target: &mut T
    )
    where
        T: MutVisit,
        F: FnMut(V, MatchCtxt<'a, 'tcx>) -> SmallVec<[V; 1]>
, { ... } }

Trait for AST types that can be used as patterns in a search-and-replace (mut_visit_match).

Provided methods

fn visit<'a, 'tcx, T, F>(
    self,
    _init_mcx: MatchCtxt<'a, 'tcx>,
    _callback: F,
    _target: &mut T
) where
    T: MutVisit,
    F: FnMut(&mut V, MatchCtxt<'a, 'tcx>), 

fn flat_map<'a, 'tcx, T, F>(
    self,
    _init_mcx: MatchCtxt<'a, 'tcx>,
    _callback: F,
    _target: &mut T
) where
    T: MutVisit,
    F: FnMut(V, MatchCtxt<'a, 'tcx>) -> SmallVec<[V; 1]>, 

Loading content...

Implementations on Foreign Types

impl Pattern<P<Expr>> for P<Expr>[src]

fn flat_map<'a, 'tcx, T, F>(
    self,
    _init_mcx: MatchCtxt<'a, 'tcx>,
    _callback: F,
    _target: &mut T
) where
    T: MutVisit,
    F: FnMut(V, MatchCtxt<'a, 'tcx>) -> SmallVec<[V; 1]>, 
[src]

impl Pattern<P<Ty>> for P<Ty>[src]

fn flat_map<'a, 'tcx, T, F>(
    self,
    _init_mcx: MatchCtxt<'a, 'tcx>,
    _callback: F,
    _target: &mut T
) where
    T: MutVisit,
    F: FnMut(V, MatchCtxt<'a, 'tcx>) -> SmallVec<[V; 1]>, 
[src]

impl Pattern<Stmt> for Stmt[src]

fn flat_map<'a, 'tcx, T, F>(
    self,
    _init_mcx: MatchCtxt<'a, 'tcx>,
    _callback: F,
    _target: &mut T
) where
    T: MutVisit,
    F: FnMut(V, MatchCtxt<'a, 'tcx>) -> SmallVec<[V; 1]>, 
[src]

impl Pattern<Vec<Stmt>> for Vec<Stmt>[src]

fn flat_map<'a, 'tcx, T, F>(
    self,
    _init_mcx: MatchCtxt<'a, 'tcx>,
    _callback: F,
    _target: &mut T
) where
    T: MutVisit,
    F: FnMut(V, MatchCtxt<'a, 'tcx>) -> SmallVec<[V; 1]>, 
[src]

Loading content...

Implementors

Loading content...