Struct regex::exec::ExecNoSync[][src]

pub struct ExecNoSync<'c> {
    ro: &'c Arc<ExecReadOnly>,
    cache: &'c RefCell<ProgramCacheInner>,
}

ExecNoSync is like Exec, except it embeds a reference to a cache. This means it is no longer Sync, but we can now avoid the overhead of synchronization to fetch the cache.

Fields

All read only state.

Caches for the various matching engines.

Methods

impl<'c> ExecNoSync<'c>
[src]

Finds the leftmost-first match using only literal search.

Finds the leftmost-first match (start and end) using only the DFA.

If the result returned indicates that the DFA quit, then another matching engine should be used.

Finds the leftmost-first match (start and end) using only the DFA, but assumes the regex is anchored at the end and therefore starts at the end of the regex and matches in reverse.

If the result returned indicates that the DFA quit, then another matching engine should be used.

Finds the end of the shortest match using only the DFA.

Finds the end of the shortest match using only the DFA by scanning for suffix literals.

Finds the end of the shortest match using only the DFA by scanning for suffix literals. It also reports the start of the match.

Note that if None is returned, then the optimization gave up to avoid worst case quadratic behavior. A forward scanning DFA should be tried next.

If a match is returned and the full leftmost-first match is desired, then a forward scan starting from the beginning of the match must be done.

If the result returned indicates that the DFA quit, then another matching engine should be used.

Finds the leftmost-first match (start and end) using only the DFA by scanning for suffix literals.

If the result returned indicates that the DFA quit, then another matching engine should be used.

Executes the NFA engine to return whether there is a match or not.

Ideally, we could use shortest_nfa(...).is_some() and get the same performance characteristics, but regex sets don't have captures, which shortest_nfa depends on.

Like match_nfa, but allows specification of the type of NFA engine.

Finds the shortest match using an NFA.

Like shortest_nfa, but allows specification of the type of NFA engine.

Like find, but executes an NFA engine.

Like find_nfa, but fills in captures and restricts the search space using previously found match information.

slots should have length equal to 2 * nfa.captures.len().

Like find_nfa, but fills in captures.

slots should have length equal to 2 * nfa.captures.len().

Like captures_nfa, but allows specification of type of NFA engine.

Always run the NFA algorithm.

Always runs the NFA using bounded backtracking.

Finds which regular expressions match the given text.

matches should have length equal to the number of regexes being searched.

This is only useful when one wants to know which regexes in a set match some text.

Trait Implementations

impl<'c> Debug for ExecNoSync<'c>
[src]

Formats the value using the given formatter. Read more

impl<'c> RegularExpression for ExecNoSync<'c>
[src]

The type of the haystack.

Returns the number of capture slots in the regular expression. (There are two slots for every capture group, corresponding to possibly empty start and end locations of the capture.)

Returns the position of the next character after i. Read more

Returns the end of a match location, possibly occurring before the end location of the correct leftmost-first match.

Returns true if and only if the regex matches text.

For single regular expressions, this is equivalent to calling shortest_match(...).is_some().

Finds the start and end location of the leftmost-first match, starting at the given location.

Finds the start and end location of the leftmost-first match and also fills in all matching capture groups.

The number of capture slots given should be equal to the total number of capture slots in the compiled program.

Note that the first two slots always correspond to the start and end locations of the overall match.

Allocates fresh space for all capturing groups in this regex.

Important traits for Matches<'t, R>

Returns an iterator over all non-overlapping successive leftmost-first matches. Read more

Important traits for CaptureMatches<'t, R>

Returns an iterator over all non-overlapping successive leftmost-first matches with captures. Read more

Auto Trait Implementations

impl<'c> !Send for ExecNoSync<'c>

impl<'c> !Sync for ExecNoSync<'c>