Struct grep::GrepBuilder [] [src]

pub struct GrepBuilder {
    // some fields omitted
}

A builder for a grep searcher.

Methods

impl GrepBuilder
[src]

Create a new builder for line searching.

The pattern given should be a regular expression. The precise syntax supported is documented on the regex crate.

Set the line terminator.

The line terminator can be any ASCII character and serves to delineate the match boundaries in the text searched.

This panics if ascii_byte is greater than 0x7F (i.e., not ASCII).

Set the case sensitive flag (i) on the regex.

Set the approximate size limit of the compiled regular expression.

This roughly corresponds to the number of bytes occupied by a single compiled program. If the program exceeds this number, then a compilation error is returned.

Set the approximate size of the cache used by the DFA.

This roughly corresponds to the number of bytes that the DFA will use while searching.

Note that this is a per thread limit. There is no way to set a global limit. In particular, if a regex is used from multiple threads simulanteously, then each thread may use up to the number of bytes specified here.

Create a line searcher.

If there was a problem parsing or compiling the regex with the given options, then an error is returned.

Trait Implementations

impl Clone for GrepBuilder
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for GrepBuilder
[src]

Formats the value using the given formatter.