pub struct FoldCache { /* private fields */ }Expand description
The per-depth states of the walk’s memoised folds, for
Ancestors::fold_down (#1597), the per-node memos for
Ancestors::node_memo, and the word slots keyed on the node the
walk is visiting (Ancestors::classified).
One slot per depth and lane, keyed by the id of the ancestor at that
depth: the state folded over every ancestor above it. Interior
mutability, because Ancestors lends it shared, as it lends a
SiblingCache. One cell per lane, because a fold’s step may ask a
question another lane memoises — the JS family’s doc-in-body fold
asks whether each ancestor is a function — and that fold must not
find its lane borrowed by the one in progress.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for FoldCache
impl !RefUnwindSafe for FoldCache
impl !Sync for FoldCache
impl Forget for FoldCache
impl Move for FoldCache
impl Send for FoldCache
impl Unpin for FoldCache
impl UnsafeUnpin for FoldCache
impl UnwindSafe for FoldCache
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