Struct regex::internal::LiteralSearcher[][src]

pub struct LiteralSearcher {
    complete: bool,
    lcp: FreqyPacked,
    lcs: FreqyPacked,
    matcher: Matcher,
}

A prefix extracted from a compiled regular expression.

A regex prefix is a set of literal strings that must be matched at the beginning of a regex in order for the entire regex to match. Similarly for a regex suffix.

Fields

Methods

impl LiteralSearcher
[src]

Returns a matcher that never matches and never advances the input.

Returns a matcher for literal prefixes from the given set.

Returns a matcher for literal suffixes from the given set.

Returns true if all matches comprise the entire regular expression.

This does not necessarily mean that a literal match implies a match of the regular expression. For example, the regular expresison ^a is comprised of a single complete literal a, but the regular expression demands that it only match at the beginning of a string.

Find the position of a literal in haystack if it exists.

Like find, except matches must start at index 0.

Like find, except matches must end at index haystack.len().

Important traits for LiteralIter<'a>

Returns an iterator over all literals to be matched.

Returns a matcher for the longest common prefix of this matcher.

Returns a matcher for the longest common suffix of this matcher.

Returns true iff this prefix is empty.

Returns the number of prefixes in this machine.

Return the approximate heap usage of literals in bytes.

Trait Implementations

impl Clone for LiteralSearcher
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for LiteralSearcher
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for LiteralSearcher

impl Sync for LiteralSearcher