Struct ScanCache
pub struct ScanCache { /* private fields */ }Expand description
Per-lex-session scratch for the Lazy fast engine’s lazy DFA, threaded through
LexerState so the hot scan reuses a cache instead of
acquiring a pooled one per token (the pool exists for &self thread-safe
access; a &mut-threaded cache is cheaper on the single-threaded lex path —
worth ~3-4% of parse). Keyed by DFA identity because a contextual lexer’s
per-state lexers each have their own DFA and a lazy Cache is valid only for
the DFA that built it. A no-op for the Meta/Dense engines. Empty until the
first Lazy scan; a fresh one costs nothing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScanCache
impl RefUnwindSafe for ScanCache
impl Send for ScanCache
impl Sync for ScanCache
impl Unpin for ScanCache
impl UnsafeUnpin for ScanCache
impl UnwindSafe for ScanCache
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