Struct FinderRev
pub struct FinderRev(/* private field */);
A reverse substring searcher that uses the Two-Way algorithm.
Implementations
impl FinderRev
fn new(needle: &[u8]) -> FinderRevCreate a searcher that finds occurrences of the given
needle.An empty
needleresults in a match at every position in a haystack, including athaystack.len().fn rfind(&self, haystack: &[u8], needle: &[u8]) -> Option<usize>Returns the last occurrence of
needlein the givenhaystack, orNoneif no such occurrence could be found.The
needlegiven must be the same as theneedleprovided toFinderRev::new.An empty
needleresults in a match at every position in a haystack, including athaystack.len().
Trait Implementations
impl Clone for FinderRev
fn clone(&self) -> FinderRev
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,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for FinderRev
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for FinderRev
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for FinderRev
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for FinderRev
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for FinderRev
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for FinderRev
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for FinderRev
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for FinderRev
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>