Struct regex::dfa::Cache [−][src]
pub struct Cache { inner: CacheInner, qcur: SparseSet, qnext: SparseSet, }
A reusable cache of DFA states.
This cache is reused between multiple invocations of the same regex program. (It is not shared simultaneously between threads. If there is contention, then new caches are created.)
Fields
inner: CacheInner
Group persistent DFA related cache state together. The sparse sets listed below are used as scratch space while computing uncached states.
qcur: SparseSet
qcur and qnext are ordered sets with constant time addition/membership/clearing-whole-set and linear time iteration. They are used to manage the sets of NFA states in DFA states when computing cached DFA states. In particular, the order of the NFA states matters for leftmost-first style matching. Namely, when computing a cached state, the set of NFA states stops growing as soon as the first Match instruction is observed.
qnext: SparseSet
Methods
impl Cache
[src]
impl Cache
Trait Implementations
impl Clone for Cache
[src]
impl Clone for Cache
fn clone(&self) -> Cache
[src]
fn clone(&self) -> Cache
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Cache
[src]
impl Debug for Cache