Struct grep::GrepBuilder [] [src]

pub struct GrepBuilder { /* fields omitted */ }

A builder for a grep searcher.

Methods

impl GrepBuilder
[src]

[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.

[src]

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).

[src]

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

[src]

Whether to enable smart case search or not (disabled by default).

Smart case uses case insensitive search if the regex is contains all lowercase literal characters. Otherwise, a case sensitive search is used instead.

Enabling the case_insensitive flag overrides this.

[src]

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.

[src]

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.

[src]

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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for GrepBuilder
[src]

[src]

Formats the value using the given formatter.