pub struct NodePtr<V: Variant> { /* private fields */ }
Expand description
A wrapper around a node pointer.
Implementations§
Source§impl<V: Variant> NodePtr<V>
impl<V: Variant> NodePtr<V>
Sourcepub unsafe fn node(&self) -> &Node<V>
pub unsafe fn node(&self) -> &Node<V>
Returns a reference to the node.
§Safety
The caller must ensure that:
- this pointer is created from a self referential collection,
- the collection is still alive, and finally,
- the memory state of the collection has not changed since the pointer was created.
Sourcepub unsafe fn node_mut(&self) -> &mut Node<V>
pub unsafe fn node_mut(&self) -> &mut Node<V>
Returns a mutable reference to the node.
§Safety
The caller must ensure that:
- this pointer is created from a self referential collection,
- the collection is still alive, and finally,
- the memory state of the collection has not changed since the pointer was created.
Trait Implementations§
impl<V: Variant> Send for NodePtr<V>
impl<V: Variant> Sync for NodePtr<V>
Auto Trait Implementations§
impl<V> Freeze for NodePtr<V>
impl<V> RefUnwindSafe for NodePtr<V>where
<V as Variant>::Prev: RefUnwindSafe,
<V as Variant>::Next: RefUnwindSafe,
<V as Variant>::Item: RefUnwindSafe,
impl<V> Unpin for NodePtr<V>
impl<V> UnwindSafe for NodePtr<V>where
<V as Variant>::Prev: RefUnwindSafe,
<V as Variant>::Next: RefUnwindSafe,
<V as Variant>::Item: RefUnwindSafe,
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