[][src]Enum sliceslice::x86::DynamicAvx2Searcher

Single-substring searcher based on Avx2Searcher but with dynamic algorithm selection.

It has specialized cases for zero-length needles, which are found in all haystacks, and one-length needles, which uses MemchrSearcher. For needles up to a length of thirteen it uses specialized versions of Avx2Searcher, finally falling back to the generic version of Avx2Searcher for longer needles.

Variants

N0

Specialization for needles with length 0.

Specialization for needles with length 1.

Specialization for needles with length 2.

Specialization for needles with length 3.

Specialization for needles with length 4.

Specialization for needles with length 5.

Specialization for needles with length 6.

Specialization for needles with length 7.

Specialization for needles with length 8.

Specialization for needles with length 9.

Specialization for needles with length 10.

Specialization for needles with length 11.

Specialization for needles with length 12.

Specialization for needles with length 13.

Fallback implementation for needles of any size.

Implementations

impl DynamicAvx2Searcher[src]

pub unsafe fn new(needle: Box<[u8]>) -> Self[src]

This is supported with target feature avx2 only.

Creates a new searcher for needle. By default, position is set to the last character in the needle.

pub unsafe fn with_position(needle: Box<[u8]>, position: usize) -> Self[src]

This is supported with target feature avx2 only.

Same as new but allows additionally specifying the position to use.

pub unsafe fn inlined_search_in(&self, haystack: &[u8]) -> bool[src]

This is supported with target feature avx2 only.

Inlined version of search_in for hot call sites.

pub unsafe fn search_in(&self, haystack: &[u8]) -> bool[src]

This is supported with target feature avx2 only.

Performs a substring search for the needle within haystack.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.