pub enum NodeView<'a, const D: usize> {
Internal(&'a InternalData<D>),
Leaf(&'a LeafData),
}Expand description
Zero-copy immutable view of a tree node. Returned by
crate::NodeStore::view — pattern-match to branch on
internal-vs-leaf without cloning the underlying record.
Variants§
Internal(&'a InternalData<D>)
Reference to an internal node’s record.
Leaf(&'a LeafData)
Reference to a leaf node’s record.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a, const D: usize> Freeze for NodeView<'a, D>
impl<'a, const D: usize> RefUnwindSafe for NodeView<'a, D>
impl<'a, const D: usize> Send for NodeView<'a, D>
impl<'a, const D: usize> Sync for NodeView<'a, D>
impl<'a, const D: usize> Unpin for NodeView<'a, D>
impl<'a, const D: usize> UnsafeUnpin for NodeView<'a, D>
impl<'a, const D: usize> UnwindSafe for NodeView<'a, D>
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> 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