pub struct UnifiedNode<Data: Debug> { /* private fields */ }
Available on crate feature
unified
only.Expand description
A node that is not split into separate branch and leaf nodes. This is the non-deque version, where children are represented as a linked list. In this version, a node’s previous sibling(s) and next sibling(s) are available, but nodes cannot be directly indexed, nor can children be detached, removed, or inserted by index.
Data
represents the custom data associated with the the node.
§See also
For the deque version, see UnifiedNodeDeque
.
For a node that is split into separate branch and leaf nodes, see
SplitNode
and SplitNodeDeque
.
Trait Implementations§
Source§impl<Data: Debug> BaseNode for UnifiedNode<Data>
impl<Data: Debug> BaseNode for UnifiedNode<Data>
Source§type Representation = UnifiedNodeRepresentation<Data>
type Representation = UnifiedNodeRepresentation<Data>
Source§type Branch = UnifiedNode<Data>
type Branch = UnifiedNode<Data>
The type used for branch nodes. Read more
Source§type Leaf = UnifiedNode<Data>
type Leaf = UnifiedNode<Data>
The type used for leaf nodes. Read more
Source§fn into_representation(self, arena: &mut Arena<Self>) -> Self::Representation
fn into_representation(self, arena: &mut Arena<Self>) -> Self::Representation
Converts this node into its representation. Read more
Source§impl<Data: Debug> BranchNode for UnifiedNode<Data>
impl<Data: Debug> BranchNode for UnifiedNode<Data>
Source§type ChildrenIter<'branch> = ChildrenLinked<'branch, UnifiedNode<Data>>
where
Self: 'branch
type ChildrenIter<'branch> = ChildrenLinked<'branch, UnifiedNode<Data>> where Self: 'branch
The iterator returned by
children
.Source§fn children<'branch>(
&'branch self,
arena: &'branch Arena<Self>,
) -> Self::ChildrenIter<'branch>
fn children<'branch>( &'branch self, arena: &'branch Arena<Self>, ) -> Self::ChildrenIter<'branch>
Returns an iterator over the tokens of this branch node’s children.
Source§fn pop_front(
token: Self::Token,
arena: &mut Arena<Self>,
) -> Option<UnifiedNodeRepresentation<Data>>
fn pop_front( token: Self::Token, arena: &mut Arena<Self>, ) -> Option<UnifiedNodeRepresentation<Data>>
Removes this branch node’s first child. Read more
Source§fn pop_back(
token: Self::Token,
arena: &mut Arena<Self>,
) -> Option<UnifiedNodeRepresentation<Data>>
fn pop_back( token: Self::Token, arena: &mut Arena<Self>, ) -> Option<UnifiedNodeRepresentation<Data>>
Removes this branch node’s last child. Read more
Source§impl<Data: Debug> Hash for UnifiedNode<Data>
impl<Data: Debug> Hash for UnifiedNode<Data>
Source§impl<Data: Debug> LinkedNode for UnifiedNode<Data>
impl<Data: Debug> LinkedNode for UnifiedNode<Data>
Source§fn preceding_siblings<'node>(
&'node self,
arena: &'node Arena<Self::Base>,
) -> PrecedingSiblings<'node, Self> ⓘwhere
Self: Sized,
fn preceding_siblings<'node>(
&'node self,
arena: &'node Arena<Self::Base>,
) -> PrecedingSiblings<'node, Self> ⓘwhere
Self: Sized,
Source§fn following_siblings<'node>(
&'node self,
arena: &'node Arena<Self::Base>,
) -> FollowingSiblings<'node, Self> ⓘwhere
Self: Sized,
fn following_siblings<'node>(
&'node self,
arena: &'node Arena<Self::Base>,
) -> FollowingSiblings<'node, Self> ⓘwhere
Self: Sized,
Source§impl<Data: Debug> Node for UnifiedNode<Data>
impl<Data: Debug> Node for UnifiedNode<Data>
Source§type DataRef<'data> = &'data Data
where
Self: 'data
type DataRef<'data> = &'data Data where Self: 'data
Source§type DataRefMut<'data> = &'data mut Data
where
Self: 'data
type DataRefMut<'data> = &'data mut Data where Self: 'data
Source§fn data_mut(&mut self) -> &mut Self::Data
fn data_mut(&mut self) -> &mut Self::Data
Returns a mutable reference to the data associated with this node.
Source§impl<Data: Debug> PartialEq for UnifiedNode<Data>
impl<Data: Debug> PartialEq for UnifiedNode<Data>
impl<Data: Debug> Eq for UnifiedNode<Data>
Auto Trait Implementations§
impl<Data> Freeze for UnifiedNode<Data>where
Data: Freeze,
impl<Data> RefUnwindSafe for UnifiedNode<Data>where
Data: RefUnwindSafe,
impl<Data> Send for UnifiedNode<Data>where
Data: Send,
impl<Data> Sync for UnifiedNode<Data>where
Data: Sync,
impl<Data> Unpin for UnifiedNode<Data>where
Data: Unpin,
impl<Data> UnwindSafe for UnifiedNode<Data>where
Data: UnwindSafe,
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