Struct core::str::pattern::TwoWaySearcher [] [src]

struct TwoWaySearcher {
    crit_pos: usize,
    crit_pos_back: usize,
    period: usize,
    byteset: u64,
    position: usize,
    end: usize,
    memory: usize,
    memory_back: usize,
}
Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

The internal state of the two-way substring search algorithm.

Fields

crit_pos
Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

critical factorization index

crit_pos_back
Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

critical factorization index for reversed needle

period
Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

byteset
Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

byteset is an extension (not part of the two way algorithm); it's a 64-bit "fingerprint" where each set bit j corresponds to a (byte & 63) == j present in the needle.

position
Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

end
Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

memory
Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

index into needle before which we have already matched

memory_back
Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

index into needle after which we have already matched

Methods

impl TwoWaySearcher

fn new(needle: &[u8], end: usize) -> TwoWaySearcher

Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

fn byteset_create(bytes: &[u8]) -> u64

Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

fn byteset_contains(&self, byte: u8) -> bool

Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

fn next<S>(&mut self, haystack: &[u8], needle: &[u8], long_period: bool) -> S::Output where S: TwoWayStrategy

Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

fn next_back<S>(&mut self, haystack: &[u8], needle: &[u8], long_period: bool) -> S::Output where S: TwoWayStrategy

Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

fn maximal_suffix(arr: &[u8], order_greater: bool) -> (usize, usize)

Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

fn reverse_maximal_suffix(arr: &[u8], known_period: usize, order_greater: bool) -> usize

Unstable (pattern #27721)

: API not fully fleshed out and ready to be stabilized

Trait Implementations

Derived Implementations

impl Debug for TwoWaySearcher

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for TwoWaySearcher

fn clone(&self) -> TwoWaySearcher

fn clone_from(&mut self, source: &Self)