pub struct RefsArray<const N: usize, V>(/* private fields */)
where
V: Variant;
Expand description
A constant number of references.
Implementations§
Source§impl<const N: usize, V: Variant> RefsArray<N, V>
impl<const N: usize, V: Variant> RefsArray<N, V>
Sourcepub fn get(&self, ref_idx: usize) -> Option<&NodePtr<V>>
pub fn get(&self, ref_idx: usize) -> Option<&NodePtr<V>>
Returns the node pointer at the ref_idx
position of the references array.
Sourcepub fn set(&mut self, ref_idx: usize, node_idx: Option<NodePtr<V>>)
pub fn set(&mut self, ref_idx: usize, node_idx: Option<NodePtr<V>>)
Sets the the node pointer at the ref_idx
position of the references array to the given node_idx
.
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize, V> Freeze for RefsArray<N, V>
impl<const N: usize, V> RefUnwindSafe for RefsArray<N, V>where
<V as Variant>::Prev: RefUnwindSafe,
<V as Variant>::Next: RefUnwindSafe,
<V as Variant>::Item: RefUnwindSafe,
impl<const N: usize, V> Send for RefsArray<N, V>
impl<const N: usize, V> Sync for RefsArray<N, V>
impl<const N: usize, V> Unpin for RefsArray<N, V>
impl<const N: usize, V> UnwindSafe for RefsArray<N, 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