pub struct PrepareIndexCloningNode<T> {
pub pos_array: Vec<(bool, usize)>,
/* private fields */
}Expand description
Preparation node - built once, stores the reference structure. Uses HashMap to detect shared references.
Fields§
§pos_array: Vec<(bool, usize)>(is_existing, position) for each reference in traversal order
Implementations§
Source§impl<T> PrepareIndexCloningNode<T>
impl<T> PrepareIndexCloningNode<T>
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
Sourcepub fn handle_reference(&mut self, r: &IndexRef<T>)
pub fn handle_reference(&mut self, r: &IndexRef<T>)
Handle a reference during preparation phase. Records whether it’s new or existing, and its position.
Sourcepub fn unique_count(&self) -> usize
pub fn unique_count(&self) -> usize
Get the number of unique references.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for PrepareIndexCloningNode<T>
impl<T> !RefUnwindSafe for PrepareIndexCloningNode<T>
impl<T> !Send for PrepareIndexCloningNode<T>
impl<T> !Sync for PrepareIndexCloningNode<T>
impl<T> Unpin for PrepareIndexCloningNode<T>
impl<T> UnsafeUnpin for PrepareIndexCloningNode<T>
impl<T> !UnwindSafe for PrepareIndexCloningNode<T>
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