pub struct TwoByteWM { /* private fields */ }
Expand description
TwoByteWM
stores the precomputed tables needed for a two-byte-wide implementation of the
Wu-Manber algorithm.
“Two-byte-wide” means that the search phase in the Wu-Manber algorithm uses spans of two bytes to look for potential matches. This is suitable for moderately sized sets of needles; if there are too many needles then it might be faster to use spans of three bytes (but that isn’t yet implemented by this crate).
Implementations§
source§impl TwoByteWM
impl TwoByteWM
sourcepub fn new<I, P>(needles: I) -> TwoByteWM
pub fn new<I, P>(needles: I) -> TwoByteWM
Creates lookup tables to efficiently search for the given needles.
The order of needles
is significant, since all Match
es returned from this TwoByteWM
will include an index into needles
saying which needle matched.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TwoByteWM
impl RefUnwindSafe for TwoByteWM
impl Send for TwoByteWM
impl Sync for TwoByteWM
impl Unpin for TwoByteWM
impl UnwindSafe for TwoByteWM
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more