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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so 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.