Struct Finder
struct Finder(_)
A forward substring searcher that uses the Two-Way algorithm.
Implementations
impl Finder
fn new(needle: &[u8]) -> FinderCreate 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 find(self: &Self, haystack: &[u8], needle: &[u8]) -> Option<usize>Returns the first occurrence of
needlein the givenhaystack, orNoneif no such occurrence could be found.The
needlegiven must be the same as theneedleprovided toFinder::new.An empty
needleresults in a match at every position in a haystack, including athaystack.len().
impl Clone for Finder
fn clone(self: &Self) -> Finder
impl Copy for Finder
impl Debug for Finder
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Freeze for Finder
impl RefUnwindSafe for Finder
impl Send for Finder
impl Sync for Finder
impl Unpin for Finder
impl UnwindSafe for Finder
impl<T> Any for Finder
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Finder
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Finder
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Finder
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Finder
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Finder
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Finder
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Finder
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Finder
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>