Trait generational_arena_tree::LinkedNode
source · pub trait LinkedNode: Nodewhere
Self::Base: LinkedNode,{
// Required methods
fn prev(&self) -> Option<<Self::Base as Node>::Token>;
fn next(&self) -> Option<<Self::Base as Node>::Token>;
// Provided methods
fn preceding_siblings<'node>(
&'node self,
arena: &'node Arena<Self::Base>
) -> PrecedingSiblings<'node, Self> ⓘ
where Self: Sized { ... }
fn following_siblings<'node>(
&'node self,
arena: &'node Arena<Self::Base>
) -> FollowingSiblings<'node, Self> ⓘ
where Self: Sized { ... }
}
Required Methods§
Provided Methods§
sourcefn 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,
Returns an iterator over the tokens of this node’s preceding siblings.
This iterator begins with the previous node and ends with the first child of the parent node.
If this is the first child, the iterator will be empty.
sourcefn 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,
Returns an iterator over the tokens of this node’s following siblings.
This iterator begins with the next node and ends with the last child of the parent node.
If this is the last child, the iterator will be empty.
Object Safety§
This trait is not object safe.
Implementors§
impl<BranchData, LeafData> LinkedNode for SplitNode<BranchData, LeafData>
Available on crate feature
split
only.impl<BranchData, LeafData> LinkedNode for Branch<BranchData, LeafData>
Available on crate feature
split
only.impl<BranchData, LeafData> LinkedNode for Leaf<BranchData, LeafData>
Available on crate feature
split
only.impl<Data: Debug> LinkedNode for UnifiedNode<Data>
Available on crate feature
unified
only.