struct NodePtrMut<'a, V>(*mut Node<V>, PhantomData<&'a mut V>);Expand description
A Copy wrapper around *mut Node<V> that serves as the exclusive counterpart to
&Node<V> in the NodeRef trait.
The phantom lifetime 'a ties the yielded &'a mut V references back to the original
&'a mut MultiIndexed (or &'a mut KdTrie), ensuring soundness.
This is safe to use because:
- It is only constructed from
&mut MultiIndexed/&mut KdTrie, guaranteeing exclusive access to the entire tree. - The tree structure ensures that nodes at different positions are disjoint in memory.
- The iterator yields each value at most once.
Tuple Fields§
§0: *mut Node<V>§1: PhantomData<&'a mut V>Trait Implementations§
Source§impl<V> Clone for NodePtrMut<'_, V>
impl<V> Clone for NodePtrMut<'_, V>
Source§impl<'a, V> NodeRef for NodePtrMut<'a, V>
Exclusive node reference. Yields &mut V values.
impl<'a, V> NodeRef for NodePtrMut<'a, V>
Exclusive node reference. Yields &mut V values.
impl<V> Copy for NodePtrMut<'_, V>
Auto Trait Implementations§
impl<'a, V> Freeze for NodePtrMut<'a, V>
impl<'a, V> RefUnwindSafe for NodePtrMut<'a, V>where
V: RefUnwindSafe,
impl<'a, V> !Send for NodePtrMut<'a, V>
impl<'a, V> !Sync for NodePtrMut<'a, V>
impl<'a, V> Unpin for NodePtrMut<'a, V>
impl<'a, V> !UnwindSafe for NodePtrMut<'a, V>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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