pub struct CompiledCharClass {
pub bitmap: AsciiClassBitmap,
pub original: CharClass,
pub unicode: bool,
}Expand description
A precompiled character class for fast matching.
Combines bitmap for ASCII and handles non-ASCII via the original CharClass.
Fields§
§bitmap: AsciiClassBitmapFast ASCII bitmap.
original: CharClassOriginal char class for non-ASCII and complex cases.
unicode: boolUnicode mode - enable Unicode character classes.
Implementations§
Source§impl CompiledCharClass
impl CompiledCharClass
Sourcepub fn new_with_unicode(class: &CharClass, unicode: bool) -> Self
pub fn new_with_unicode(class: &CharClass, unicode: bool) -> Self
Create a compiled character class with unicode mode.
Sourcepub fn find_first(&self, haystack: &[u8]) -> Option<usize>
pub fn find_first(&self, haystack: &[u8]) -> Option<usize>
Find the first position where any byte matches.
Trait Implementations§
Source§impl Clone for CompiledCharClass
impl Clone for CompiledCharClass
Source§fn clone(&self) -> CompiledCharClass
fn clone(&self) -> CompiledCharClass
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompiledCharClass
impl RefUnwindSafe for CompiledCharClass
impl Send for CompiledCharClass
impl Sync for CompiledCharClass
impl Unpin for CompiledCharClass
impl UnsafeUnpin for CompiledCharClass
impl UnwindSafe for CompiledCharClass
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