Struct grep_searcher::SinkContext[][src]

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

A type that describes a contextual line reported by a searcher.

Methods

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

Returns the context bytes, including line terminators.

Returns the type of context.

Returns the absolute byte offset of the start of this context. 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 context, if available.

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

Trait Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'b> Send for SinkContext<'b>

impl<'b> Sync for SinkContext<'b>