Struct NodeMatcher

Source
pub struct NodeMatcher<'a> { /* private fields */ }

Trait Implementations§

Source§

impl Sink for NodeMatcher<'_>

Source§

type Error = 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, Error>

This method is called whenever a match is found. Read more
§

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>

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>

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
§

fn begin(&mut self, _searcher: &Searcher) -> Result<bool, Self::Error>

This method is called when a search has begun, before any search is executed. By default, this does nothing. Read more
§

fn finish( &mut self, _searcher: &Searcher, _: &SinkFinish, ) -> Result<(), Self::Error>

This method is called when a search has completed. By default, this does nothing. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for NodeMatcher<'a>

§

impl<'a> RefUnwindSafe for NodeMatcher<'a>

§

impl<'a> !Send for NodeMatcher<'a>

§

impl<'a> !Sync for NodeMatcher<'a>

§

impl<'a> Unpin for NodeMatcher<'a>

§

impl<'a> !UnwindSafe for NodeMatcher<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.