Struct FinderRev

pub struct FinderRev(/* private field */);

A reverse substring searcher that uses the Two-Way algorithm.

Implementations

impl FinderRev

fn new(needle: &[u8]) -> FinderRev

Create a searcher that finds occurrences of the given needle.

An empty needle results in a match at every position in a haystack, including at haystack.len().

fn rfind(&self, haystack: &[u8], needle: &[u8]) -> Option<usize>

Returns the last occurrence of needle in the given haystack, or None if no such occurrence could be found.

The needle given must be the same as the needle provided to FinderRev::new.

An empty needle results in a match at every position in a haystack, including at haystack.len().

Trait Implementations

impl Clone for FinderRev

fn clone(&self) -> Self

impl Copy for FinderRev

impl Debug for FinderRev

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

Auto Trait Implementations

impl Freeze for FinderRev

impl RefUnwindSafe for FinderRev

impl Send for FinderRev

impl Sync for FinderRev

impl Unpin for FinderRev

impl UnsafeUnpin for FinderRev

impl UnwindSafe for FinderRev

Blanket Implementations

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

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

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

impl<T> CloneToUninit for FinderRev where T: Clone,

impl<T> From<T> for FinderRev

impl<T> ToOwned for FinderRev where T: Clone,

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

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

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