pub struct UnifiedNodeDeque<Data: Debug> { /* private fields */ }
Available on crate features
deque
and unified
only.Expand description
A node that is not split into separate branch and leaf nodes.
This is the deque version, where children are represented as a VecDeque
. In this
version, a node’s previous sibling(s) and
next sibling(s) are not available, but nodes can be directly indexed,
and children can be detached, removed, or inserted by index.
Data
represents the custom data associated with the node.
§See also
For the non-deque version, see UnifiedNode
.
For a node that is split into separate branch and leaf nodes, see SplitNode
and SplitNodeDeque
.
Trait Implementations§
Source§impl<Data: Debug> BaseNode for UnifiedNodeDeque<Data>
impl<Data: Debug> BaseNode for UnifiedNodeDeque<Data>
Source§type Representation = UnifiedNodeRepresentation<Data>
type Representation = UnifiedNodeRepresentation<Data>
Source§type Branch = UnifiedNodeDeque<Data>
type Branch = UnifiedNodeDeque<Data>
The type used for branch nodes. Read more
Source§type Leaf = UnifiedNodeDeque<Data>
type Leaf = UnifiedNodeDeque<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 UnifiedNodeDeque<Data>
impl<Data: Debug> BranchNode for UnifiedNodeDeque<Data>
Source§type ChildrenIter<'branch> = Copied<Iter<'branch, Token<UnifiedNodeDeque<Data>>>>
where
Self: 'branch
type ChildrenIter<'branch> = Copied<Iter<'branch, Token<UnifiedNodeDeque<Data>>>> where Self: 'branch
The iterator returned by
children
.Source§fn children<'branch>(
&'branch self,
_arena: &'branch Arena<Self::Base>,
) -> Self::ChildrenIter<'branch>
fn children<'branch>( &'branch self, _arena: &'branch Arena<Self::Base>, ) -> 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::Base>,
) -> Option<UnifiedNodeRepresentation<Data>>
fn pop_front( token: Self::Token, arena: &mut Arena<Self::Base>, ) -> Option<UnifiedNodeRepresentation<Data>>
Removes this branch node’s first child. Read more
Source§fn pop_back(
token: Self::Token,
arena: &mut Arena<Self::Base>,
) -> Option<UnifiedNodeRepresentation<Data>>
fn pop_back( token: Self::Token, arena: &mut Arena<Self::Base>, ) -> Option<UnifiedNodeRepresentation<Data>>
Removes this branch node’s last child. Read more
Source§impl<Data: Debug> BranchNodeDeque for UnifiedNodeDeque<Data>
impl<Data: Debug> BranchNodeDeque for UnifiedNodeDeque<Data>
Source§fn remove(
token: Self::Token,
arena: &mut Arena<Self>,
index: usize,
) -> UnifiedNodeRepresentation<Data>
fn remove( token: Self::Token, arena: &mut Arena<Self>, index: usize, ) -> UnifiedNodeRepresentation<Data>
Removes the child at the given
index
. Read moreSource§impl<Data: Debug> Hash for UnifiedNodeDeque<Data>
impl<Data: Debug> Hash for UnifiedNodeDeque<Data>
Source§impl<Data: Debug> Node for UnifiedNodeDeque<Data>
impl<Data: Debug> Node for UnifiedNodeDeque<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 UnifiedNodeDeque<Data>
impl<Data: Debug> PartialEq for UnifiedNodeDeque<Data>
impl<Data: Debug> Eq for UnifiedNodeDeque<Data>
Auto Trait Implementations§
impl<Data> Freeze for UnifiedNodeDeque<Data>where
Data: Freeze,
impl<Data> RefUnwindSafe for UnifiedNodeDeque<Data>where
Data: RefUnwindSafe,
impl<Data> Send for UnifiedNodeDeque<Data>where
Data: Send,
impl<Data> Sync for UnifiedNodeDeque<Data>where
Data: Sync,
impl<Data> Unpin for UnifiedNodeDeque<Data>where
Data: Unpin,
impl<Data> UnwindSafe for UnifiedNodeDeque<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