Struct grep_searcher::SinkMatch[][src]

pub struct SinkMatch<'b> { /* fields omitted */ }

A type that describes a match reported by a searcher.

Methods

impl<'b> SinkMatch<'b>
[src]

Returns the bytes for all matching lines, including the line terminators, if they exist.

Important traits for LineIter<'b>

Return an iterator over the lines in this match.

If multi line search is enabled, then this may yield more than one line (but always at least one line). If multi line search is disabled, then this always reports exactly one line (but may consist of just the line terminator).

Lines yielded by this iterator include their terminators.

Returns the absolute byte offset of the start of this match. This offset is absolute in that it is relative to the very beginning of the input in a search, and can never be relied upon to be a valid index into an in-memory slice.

Returns the line number of the first line in this match, if available.

Line numbers are only available when the search builder is instructed to compute them.

Trait Implementations

impl<'b> Clone for SinkMatch<'b>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'b> Debug for SinkMatch<'b>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'b> Send for SinkMatch<'b>

impl<'b> Sync for SinkMatch<'b>