Trait PatternSearcher

Source
pub trait PatternSearcher<'input> {
    type Input: Input;
    type PatternID: PatternIdentifier;

    // Required methods
    fn input(&self) -> &Self::Input;
    fn last_match_end(&self) -> Option<usize>;
    fn set_last_match_end(&mut self, end: usize);
    fn patterns_len(&self) -> usize;
    fn pattern_span(&self, id: Self::PatternID) -> SourceSpan;
    fn try_match_next<'context, C>(
        &mut self,
        context: &mut C,
    ) -> DiagResult<MatchResult<'input>>
       where C: Context<'input, 'context> + ?Sized;
}

Required Associated Types§

Required Methods§

Source

fn input(&self) -> &Self::Input

Source

fn last_match_end(&self) -> Option<usize>

Source

fn set_last_match_end(&mut self, end: usize)

Source

fn patterns_len(&self) -> usize

Source

fn pattern_span(&self, id: Self::PatternID) -> SourceSpan

Source

fn try_match_next<'context, C>( &mut self, context: &mut C, ) -> DiagResult<MatchResult<'input>>
where C: Context<'input, 'context> + ?Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, 'input, A> PatternSearcher<'input> for RegexSetSearcher<'a, 'input, A>
where A: Automaton,

Source§

impl<'a, 'patterns, 'input> PatternSearcher<'input> for PatternSetSearcher<'a, 'patterns, 'input>

Source§

type Input = Input<'input>

Source§

type PatternID = usize

Source§

impl<'a, 'patterns, 'input> PatternSearcher<'input> for SubstringSetSearcher<'a, 'patterns, 'input>