Enum SearchStep

enum SearchStep

Result of calling [Searcher::next()] or [ReverseSearcher::next_back()].

Variants

Match(usize, usize)

Expresses that a match of the pattern has been found at haystack[a..b].

Reject(usize, usize)

Expresses that haystack[a..b] has been rejected as a possible match of the pattern.

Note that there might be more than one Reject between two Matches, there is no requirement for them to be combined into one.

Done

Expresses that every byte of the haystack has been visited, ending the iteration.

Implementations

impl Clone for SearchStep

fn clone(self: &Self) -> SearchStep

impl Copy for SearchStep

impl Debug for SearchStep

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

impl Eq for SearchStep

impl Freeze for SearchStep

impl PartialEq for SearchStep

fn eq(self: &Self, other: &SearchStep) -> bool

impl RefUnwindSafe for SearchStep

impl Send for SearchStep

impl StructuralPartialEq for SearchStep

impl Sync for SearchStep

impl Unpin for SearchStep

impl UnwindSafe for SearchStep

impl<T> Any for SearchStep

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for SearchStep

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

impl<T> BorrowMut for SearchStep

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

impl<T> CloneToUninit for SearchStep

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

impl<T> From for SearchStep

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for SearchStep

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 SearchStep

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

impl<T, U> TryInto for SearchStep

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