#[non_exhaustive]pub enum Strategy {
Legacy,
Gated,
Vector,
}Expand description
How the scanner walks a line. Strategies produce identical matches; they
exist so that alternatives can be measured against each other in the
same process (see the scanner bench).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Legacy
Byte-by-byte dispatch on the current byte only, dispatch and trigger finders in separate passes. The original implementation.
Gated
Single pass with context gates: a finder is only invoked when the previous and next bytes allow a match to start.
Vector
Context gates evaluated sixteen bytes at a time with SIMD (or with
memchr when the finders start at three bytes or fewer), then the
exact gates on the surviving positions (default).
Implementations§
Trait Implementations§
impl Copy for Strategy
impl Eq for Strategy
impl StructuralPartialEq for Strategy
Auto Trait Implementations§
impl Freeze for Strategy
impl RefUnwindSafe for Strategy
impl Send for Strategy
impl Sync for Strategy
impl Unpin for Strategy
impl UnsafeUnpin for Strategy
impl UnwindSafe for Strategy
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