Trait CompiledRegex

Source
pub trait CompiledRegex<I> {
    // Required methods
    fn is_match(&self, input: &[I]) -> bool;
    fn find<'t>(&self, input: &'t [I]) -> Option<Match<'t, I>>;
    fn captures<'t>(&self, input: &'t [I]) -> Option<Captures<'t, I>>;

    // Provided method
    fn is_full_match(&self, input: &[I]) -> bool { ... }
}

Required Methods§

Source

fn is_match(&self, input: &[I]) -> bool

Returns true if and only if there is a match for the regex in the slice given.

Source

fn find<'t>(&self, input: &'t [I]) -> Option<Match<'t, I>>

Returns the start and end range of the leftmost-first match in slice. If no match exists, then None is returned.

Source

fn captures<'t>(&self, input: &'t [I]) -> Option<Captures<'t, I>>

Returns the capture groups corresponding to the leftmost-first match in text. Capture group 0 always corresponds to the entire match. If no match is found, then None is returned.

Provided Methods§

Source

fn is_full_match(&self, input: &[I]) -> bool

Returns true if and only if match the entire input slice.

Implementors§