Struct StreamFindIter

pub struct StreamFindIter<'a, R>(/* private field */);

An iterator that reports Aho-Corasick matches in a stream.

This iterator yields elements of type Result<Match, std::io::Error>, where an error is reported if there was a problem reading from the underlying stream. The iterator terminates only when the underlying stream reaches EOF.

This iterator is constructed via the AhoCorasick::stream_find_iter and AhoCorasick::try_stream_find_iter methods.

The type variable R refers to the io::Read stream that is being read from.

The lifetime 'a refers to the lifetime of the corresponding AhoCorasick searcher.

Trait Implementations

impl<'a, R: Debug> Debug for StreamFindIter<'a, R>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<'a, R: Read> Iterator for StreamFindIter<'a, R>

type Item = Result<Match, Error>;
fn next(&mut self) -> Option<Result<Match, Error>>

Auto Trait Implementations

impl<'a, R> Freeze for StreamFindIter<'a, R> where StreamFindIter<'a, Arc<dyn AcAutomaton>, R>: Freeze,

impl<'a, R> RefUnwindSafe for StreamFindIter<'a, R> where StreamFindIter<'a, Arc<dyn AcAutomaton>, R>: RefUnwindSafe,

impl<'a, R> Send for StreamFindIter<'a, R> where StreamFindIter<'a, Arc<dyn AcAutomaton>, R>: Send,

impl<'a, R> Sync for StreamFindIter<'a, R> where StreamFindIter<'a, Arc<dyn AcAutomaton>, R>: Sync,

impl<'a, R> Unpin for StreamFindIter<'a, R> where StreamFindIter<'a, Arc<dyn AcAutomaton>, R>: Unpin,

impl<'a, R> UnsafeUnpin for StreamFindIter<'a, R> where StreamFindIter<'a, Arc<dyn AcAutomaton>, R>: UnsafeUnpin,

impl<'a, R> UnwindSafe for StreamFindIter<'a, R> where StreamFindIter<'a, Arc<dyn AcAutomaton>, R>: UnwindSafe,

Blanket Implementations

impl<I> IntoIterator for StreamFindIter<'a, R> where I: Iterator,

type Item = <I as Iterator>::Item;
type IntoIter = I;
fn into_iter(self) -> I

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

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for StreamFindIter<'a, R> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for StreamFindIter<'a, R> where T: ?Sized,

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

impl<T> From<T> for StreamFindIter<'a, R>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for StreamFindIter<'a, R> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom<U> for StreamFindIter<'a, R> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for StreamFindIter<'a, R> where U: TryFrom<T>,

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