Struct FindIter

struct FindIter<'h, 'n> { ... }

An iterator over non-overlapping substring matches.

Matches are reported by the byte offset at which they begin.

'h is the lifetime of the haystack while 'n is the lifetime of the needle.

Implementations

impl<'h, 'n> FindIter<'h, 'n>

fn into_owned(self: Self) -> FindIter<'h, 'static>

Convert this iterator into its owned variant, such that it no longer borrows the finder and needle.

If this is already an owned iterator, then this is a no-op. Otherwise, this copies the needle.

This is only available when the alloc feature is enabled.

impl<'h, 'n> Clone for FindIter<'h, 'n>

fn clone(self: &Self) -> FindIter<'h, 'n>

impl<'h, 'n> Debug for FindIter<'h, 'n>

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

impl<'h, 'n> Freeze for FindIter<'h, 'n>

impl<'h, 'n> Iterator for FindIter<'h, 'n>

fn next(self: &mut Self) -> Option<usize>
fn size_hint(self: &Self) -> (usize, Option<usize>)

impl<'h, 'n> RefUnwindSafe for FindIter<'h, 'n>

impl<'h, 'n> Send for FindIter<'h, 'n>

impl<'h, 'n> Sync for FindIter<'h, 'n>

impl<'h, 'n> Unpin for FindIter<'h, 'n>

impl<'h, 'n> UnwindSafe for FindIter<'h, 'n>

impl<I> IntoIterator for FindIter<'h, 'n>

fn into_iter(self: Self) -> I

impl<T> Any for FindIter<'h, 'n>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for FindIter<'h, 'n>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for FindIter<'h, 'n>

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

impl<T> CloneToUninit for FindIter<'h, 'n>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for FindIter<'h, 'n>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for FindIter<'h, 'n>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for FindIter<'h, 'n>

fn into(self: 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 for FindIter<'h, 'n>

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

impl<T, U> TryInto for FindIter<'h, 'n>

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