Struct grep_searcher::SinkFinish
source · pub struct SinkFinish { /* private fields */ }
Expand description
Summary data reported at the end of a search.
This reports data such as the total number of bytes searched and the absolute offset of the first occurrence of binary data, if any were found.
A searcher that stops early because of an error does not call finish
.
A searcher that stops early because the Sink
implementor instructed it
to will still call finish
.
Implementations§
source§impl SinkFinish
impl SinkFinish
sourcepub fn byte_count(&self) -> u64
pub fn byte_count(&self) -> u64
Return the total number of bytes searched.
sourcepub fn binary_byte_offset(&self) -> Option<u64>
pub fn binary_byte_offset(&self) -> Option<u64>
If binary detection is enabled and if binary data was found, then this returns the absolute byte offset of the first detected byte of binary data.
Note that since this is an absolute byte offset, it cannot be relied upon to index into any addressable memory.
Trait Implementations§
source§impl Clone for SinkFinish
impl Clone for SinkFinish
source§fn clone(&self) -> SinkFinish
fn clone(&self) -> SinkFinish
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for SinkFinish
impl RefUnwindSafe for SinkFinish
impl Send for SinkFinish
impl Sync for SinkFinish
impl Unpin for SinkFinish
impl UnwindSafe for SinkFinish
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)