Struct aho_corasick::packed::teddy::generic::SlimMaskBuilder
source · struct SlimMaskBuilder {
lo: [u8; 32],
hi: [u8; 32],
}
Expand description
Represents the low and high nybble masks that will be used during search. Each mask is 32 bytes wide, although only the first 16 bytes are used for 128-bit vectors.
Each byte in the mask corresponds to a 8-bit bitset, where bit i
is set
if and only if the corresponding nybble is in the ith bucket. The index of
the byte (0-15, inclusive) corresponds to the nybble.
Each mask is used as the target of a shuffle, where the indices for the
shuffle are taken from the haystack. AND’ing the shuffles for both the
low and high masks together also results in 8-bit bitsets, but where bit
i
is set if and only if the correspond byte is in the ith bucket.
Fields§
§lo: [u8; 32]
§hi: [u8; 32]
Implementations§
source§impl SlimMaskBuilder
impl SlimMaskBuilder
sourcefn add(&mut self, bucket: usize, byte: u8)
fn add(&mut self, bucket: usize, byte: u8)
Update this mask by adding the given byte to the given bucket. The given bucket must be in the range 0-7.
§Panics
When bucket >= 8
.
Trait Implementations§
source§impl Clone for SlimMaskBuilder
impl Clone for SlimMaskBuilder
source§fn clone(&self) -> SlimMaskBuilder
fn clone(&self) -> SlimMaskBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SlimMaskBuilder
impl Debug for SlimMaskBuilder
source§impl Default for SlimMaskBuilder
impl Default for SlimMaskBuilder
source§fn default() -> SlimMaskBuilder
fn default() -> SlimMaskBuilder
Auto Trait Implementations§
impl Freeze for SlimMaskBuilder
impl RefUnwindSafe for SlimMaskBuilder
impl Send for SlimMaskBuilder
impl Sync for SlimMaskBuilder
impl Unpin for SlimMaskBuilder
impl UnwindSafe for SlimMaskBuilder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)