pub struct NoCache;Expand description
Disable Caching.
This should compile out if statically selected.
Trait Implementations§
Source§impl<T> RewriteCache<T> for NoCache
impl<T> RewriteCache<T> for NoCache
Source§fn insert(&mut self, _: &T, _: Option<T>, _: usize)
fn insert(&mut self, _: &T, _: Option<T>, _: usize)
Insert the results into the cache.
Note: Any powerful side effects such as changing other parts of the tree or replacing the
root should NOT be inserted into the cache.
Source§fn is_active(&self) -> bool
fn is_active(&self) -> bool
Returns
false if this cache never stores anything (e.g. NoCache).
The engine uses this to skip clones that would only feed into a no-op insert.Source§fn invalidate_node(&self, _node: &T)
fn invalidate_node(&self, _node: &T)
Invalidate any internally cached hash for the given node.
This is called on ancestors when a subtree is replaced.
The default implementation is a no-op for caches that don’t use node-level hash caching.
Source§fn invalidate_subtree(&self, _node: &T)
fn invalidate_subtree(&self, _node: &T)
Invalidate cached hashes for the given node and all its descendants.
Called on replacement subtrees after rule application.
Source§fn push_ancestor(&mut self, _node: &T)
fn push_ancestor(&mut self, _node: &T)
Record the hash of an ancestor node before descending into a child.
Called by the zipper on every successful
go_down.Source§fn pop_ancestor(&mut self)
fn pop_ancestor(&mut self)
Discard the top ancestor hash after ascending back to a parent.
Called by the zipper on every
go_up during normal traversal.Source§fn pop_and_map_ancestor(&mut self, _new_ancestor: &T, _level: usize)
fn pop_and_map_ancestor(&mut self, _new_ancestor: &T, _level: usize)
Pop the top ancestor hash and insert a mapping from the old ancestor
to the new (rebuilt) ancestor at the given level.
Called by
mark_dirty_to_root as it walks up after a replacement.Auto Trait Implementations§
impl Freeze for NoCache
impl RefUnwindSafe for NoCache
impl Send for NoCache
impl Sync for NoCache
impl Unpin for NoCache
impl UnsafeUnpin for NoCache
impl UnwindSafe for NoCache
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 0 bytes