struct StopAfterFirstMatch {
found: bool,
}Fields§
§found: boolImplementations§
Trait Implementations§
Source§impl Sink for StopAfterFirstMatch
impl Sink for StopAfterFirstMatch
Source§type Error = Box<dyn Error>
type Error = Box<dyn Error>
The type of an error that should be reported by a searcher. Read more
Source§fn matched(
&mut self,
_searcher: &Searcher,
mat: &SinkMatch<'_>,
) -> Result<bool, Self::Error>
fn matched( &mut self, _searcher: &Searcher, mat: &SinkMatch<'_>, ) -> Result<bool, Self::Error>
This method is called whenever a match is found. Read more
§fn context(
&mut self,
_searcher: &Searcher,
_context: &SinkContext<'_>,
) -> Result<bool, Self::Error>
fn context( &mut self, _searcher: &Searcher, _context: &SinkContext<'_>, ) -> Result<bool, Self::Error>
This method is called whenever a context line is found, and is optional
to implement. By default, it does nothing and returns
true. Read more§fn context_break(&mut self, _searcher: &Searcher) -> Result<bool, Self::Error>
fn context_break(&mut self, _searcher: &Searcher) -> Result<bool, Self::Error>
This method is called whenever a break in contextual lines is found,
and is optional to implement. By default, it does nothing and returns
true. Read more§fn binary_data(
&mut self,
_searcher: &Searcher,
_binary_byte_offset: u64,
) -> Result<bool, Self::Error>
fn binary_data( &mut self, _searcher: &Searcher, _binary_byte_offset: u64, ) -> Result<bool, Self::Error>
This method is called whenever binary detection is enabled and binary
data is found. If binary data is found, then this is called at least
once for the first occurrence with the absolute byte offset at which
the binary data begins. Read more
Auto Trait Implementations§
impl Freeze for StopAfterFirstMatch
impl RefUnwindSafe for StopAfterFirstMatch
impl Send for StopAfterFirstMatch
impl Sync for StopAfterFirstMatch
impl Unpin for StopAfterFirstMatch
impl UnwindSafe for StopAfterFirstMatch
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more