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 more