[][src]Struct grep_hyperscan::RegexMatcher

pub struct RegexMatcher { /* fields omitted */ }

An implementation of the Matcher trait using hyperscan.

Methods

impl RegexMatcher[src]

pub fn new(patterns: &[String]) -> Result<RegexMatcher, Error>[src]

Create a new matcher from the given pattern using the default configuration.

Trait Implementations

impl Clone for RegexMatcher[src]

A thread safe implementation of Clone for our hyperscan RegexMatcher (1 scratchpad / thread)

impl Debug for RegexMatcher[src]

impl Matcher for RegexMatcher[src]

type Captures = NoCaptures

The concrete type of capturing groups used for this matcher. Read more

type Error = Error

The error type used by this matcher. Read more

fn find_at(
    &self,
    haystack: &[u8],
    at: usize
) -> Result<Option<Match>, Self::Error>
[src]

Main implementation. Just try to get the current MatchData for the thread before calling the actual find_at function. Note that we don't get the thread data for the scratchpad yet, as we can still read data from hyperscan result or from the buffered results.

fn new_captures(&self) -> Result<NoCaptures, Self::Error>[src]

Hyperscan can not match captures, hence the NoCaptures

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.