Struct regex::backtrack::Bounded [−][src]
pub struct Bounded<'a, 'm, 'r, 's, I> { prog: &'r Program, input: I, matches: &'m mut [bool], slots: &'s mut [Option<usize>], m: &'a mut Cache, }
A backtracking matching engine.
Fields
prog: &'r Program
input: I
matches: &'m mut [bool]
slots: &'s mut [Option<usize>]
m: &'a mut Cache
Methods
impl<'a, 'm, 'r, 's, I: Input> Bounded<'a, 'm, 'r, 's, I>
[src]
impl<'a, 'm, 'r, 's, I: Input> Bounded<'a, 'm, 'r, 's, I>
pub fn exec(
prog: &'r Program,
cache: &RefCell<ProgramCacheInner>,
matches: &'m mut [bool],
slots: &'s mut [Option<usize>],
input: I,
start: usize
) -> bool
[src]
pub fn exec(
prog: &'r Program,
cache: &RefCell<ProgramCacheInner>,
matches: &'m mut [bool],
slots: &'s mut [Option<usize>],
input: I,
start: usize
) -> bool
Execute the backtracking matching engine.
If there's a match, exec
returns true
and populates the given
captures accordingly.
fn clear(&mut self)
[src]
fn clear(&mut self)
Clears the cache such that the backtracking engine can be executed on some input of fixed length.
fn exec_(&mut self, at: InputAt) -> bool
[src]
fn exec_(&mut self, at: InputAt) -> bool
Start backtracking at the given position in the input, but also look for literal prefixes.
fn backtrack(&mut self, start: InputAt) -> bool
[src]
fn backtrack(&mut self, start: InputAt) -> bool
The main backtracking loop starting at the given input position.
fn step(&mut self, ip: usize, at: InputAt) -> bool
[src]
fn step(&mut self, ip: usize, at: InputAt) -> bool
fn has_visited(&mut self, ip: usize, at: InputAt) -> bool
[src]
fn has_visited(&mut self, ip: usize, at: InputAt) -> bool