pub struct Cached<A: Alphabet> { /* private fields */ }
Expand description
Provides access to creating new regex expressions with cached results.
Implementations§
Source§impl<A: Alphabet> Cached<A>
impl<A: Alphabet> Cached<A>
pub fn new() -> Self
Sourcepub fn insert(&mut self, op: Op<A>) -> Handle
pub fn insert(&mut self, op: Op<A>) -> Handle
Insert a new operation.
Deduplicates same operations to also point to the same handle, so you can not generally assert that the returned handle is the new root of the regex.
Sourcepub fn into_inner(self) -> Regex<A>
pub fn into_inner(self) -> Regex<A>
Turn it into a raw regex again.
Sourcepub fn fill_cache(&mut self)
pub fn fill_cache(&mut self)
Fill the cache from all subexpressions in the regex.
The cache would normally only take into account all newly added Op
s. For modifying an
existing regex this will fill the cache with all already inserted subexpressions.
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for Cached<A>
impl<A> RefUnwindSafe for Cached<A>where
A: RefUnwindSafe,
impl<A> Send for Cached<A>where
A: Send,
impl<A> Sync for Cached<A>where
A: Sync,
impl<A> Unpin for Cached<A>where
A: Unpin,
impl<A> UnwindSafe for Cached<A>where
A: UnwindSafe,
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