pub struct ByteSet(/* private fields */);Expand description
A set of bytes, stored as a 256 bits bitmap. Useful if you want to write your own prefilter.
Implementations§
Source§impl ByteSet
impl ByteSet
Sourcepub fn intersection(&mut self, other: &Self)
pub fn intersection(&mut self, other: &Self)
Removes every byte not in other
Sourcepub fn is_subset(&self, other: &Self) -> bool
pub fn is_subset(&self, other: &Self) -> bool
Returns whether the current byte set is a subset of the given one
Sourcepub fn iter(&self) -> impl Iterator<Item = u8> + '_
pub fn iter(&self) -> impl Iterator<Item = u8> + '_
Iterates over the bytes in the set, in ascending order
Sourcepub const fn from_words(words: [u64; 4]) -> Self
pub const fn from_words(words: [u64; 4]) -> Self
Builds a set from a bitmap returned by ByteSet::words.
Trait Implementations§
impl Copy for ByteSet
impl Eq for ByteSet
impl StructuralPartialEq for ByteSet
Auto Trait Implementations§
impl Freeze for ByteSet
impl RefUnwindSafe for ByteSet
impl Send for ByteSet
impl Sync for ByteSet
impl Unpin for ByteSet
impl UnsafeUnpin for ByteSet
impl UnwindSafe for ByteSet
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