pub struct ByteSet(pub [bool; 256]);Expand description
A set of bytes.
Please note that this is a [boo; 256] and is thus 256 bytes in size.
The tradeoff here is that checking if a byte is in it takes like one instruction and is thus super fast.
Tuple Fields§
§0: [bool; 256]Implementations§
Source§impl ByteSet
impl ByteSet
Sourcepub const fn remove_many(self, bs: &[u8]) -> Self
pub const fn remove_many(self, bs: &[u8]) -> Self
Self::remove each byte.
Sourcepub const fn add_non_ascii(self) -> Self
pub const fn add_non_ascii(self) -> Self
Add all non-ASCII bytes.
Sourcepub const fn remove_non_ascii(self) -> Self
pub const fn remove_non_ascii(self) -> Self
Remove all non-ASCII bytes.
Trait Implementations§
impl Copy for ByteSet
impl Eq for ByteSet
Source§impl From<PercentEncodeSet> for ByteSet
impl From<PercentEncodeSet> for ByteSet
Source§fn from(value: PercentEncodeSet) -> Self
fn from(value: PercentEncodeSet) -> Self
Converts to this type from the input type.
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