Enum generational_arena_tree::split::SplitNode
source · pub enum SplitNode<BranchData: Debug, LeafData: Debug> {
Branch(Branch<BranchData, LeafData>),
Leaf(Leaf<BranchData, LeafData>),
}
Available on crate feature
split
only.Expand description
A node that is split into separate branch and leaf nodes.
[BranchData
] represents the custom data associated with branches, while
[LeafData
] represents the custom data associated with leaves.
See also
For the deque version, see [SplitNodeDeque
].
For a node that isn’t split into separate branch and leaf nodes, see UnifiedNode
.
Variants§
Branch(Branch<BranchData, LeafData>)
A branch node that may have children.
Leaf(Leaf<BranchData, LeafData>)
A leaf node that may not have children.
Trait Implementations§
source§impl<BranchData, LeafData> BaseNode for SplitNode<BranchData, LeafData>
impl<BranchData, LeafData> BaseNode for SplitNode<BranchData, LeafData>
§type Representation = SplitNodeRepresentation<BranchData, LeafData>
type Representation = SplitNodeRepresentation<BranchData, LeafData>
source§fn into_representation(
self,
arena: &mut Arena<Self::Base>
) -> Self::Representationwhere
Self: Sized,
fn into_representation(
self,
arena: &mut Arena<Self::Base>
) -> Self::Representationwhere
Self: Sized,
Converts this node into its representation. Read more
source§impl<BranchData: Debug + Debug, LeafData: Debug + Debug> Debug for SplitNode<BranchData, LeafData>
impl<BranchData: Debug + Debug, LeafData: Debug + Debug> Debug for SplitNode<BranchData, LeafData>
source§impl<BranchData, LeafData> LinkedNode for SplitNode<BranchData, LeafData>
impl<BranchData, LeafData> LinkedNode for SplitNode<BranchData, LeafData>
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<BranchData, LeafData> Node for SplitNode<BranchData, LeafData>
impl<BranchData, LeafData> Node for SplitNode<BranchData, LeafData>
§type Token = SplitToken<BranchData, LeafData>
where
Self: Sized
type Token = SplitToken<BranchData, LeafData> where Self: Sized
The token associated with this type of node.
§type DataRef<'data> = SplitData<&'data BranchData, &'data LeafData>
where
Self: 'data
type DataRef<'data> = SplitData<&'data BranchData, &'data LeafData> where Self: 'data
§type DataRefMut<'data> = SplitData<&'data mut BranchData, &'data mut LeafData>
where
Self: 'data
type DataRefMut<'data> = SplitData<&'data mut BranchData, &'data mut LeafData> where Self: 'data
source§fn data(&self) -> Self::DataRef<'_>
fn data(&self) -> Self::DataRef<'_>
Returns a reference to the data associated with this node.
source§fn data_mut(&mut self) -> Self::DataRefMut<'_>
fn data_mut(&mut self) -> Self::DataRefMut<'_>
Returns a mutable reference to the data associated with this node.
source§impl<BranchData, LeafData> NodeToken<SplitNode<BranchData, LeafData>> for SplitToken<BranchData, LeafData>
impl<BranchData, LeafData> NodeToken<SplitNode<BranchData, LeafData>> for SplitToken<BranchData, LeafData>
source§impl<'node, BranchData, LeafData> TryFrom<&'node SplitNode<BranchData, LeafData>> for &'node Branch<BranchData, LeafData>
impl<'node, BranchData, LeafData> TryFrom<&'node SplitNode<BranchData, LeafData>> for &'node Branch<BranchData, LeafData>
source§impl<'node, BranchData, LeafData> TryFrom<&'node SplitNode<BranchData, LeafData>> for &'node Leaf<BranchData, LeafData>
impl<'node, BranchData, LeafData> TryFrom<&'node SplitNode<BranchData, LeafData>> for &'node Leaf<BranchData, LeafData>
source§impl<'node, BranchData, LeafData> TryFrom<&'node mut SplitNode<BranchData, LeafData>> for &'node mut Branch<BranchData, LeafData>
impl<'node, BranchData, LeafData> TryFrom<&'node mut SplitNode<BranchData, LeafData>> for &'node mut Branch<BranchData, LeafData>
Auto Trait Implementations§
impl<BranchData, LeafData> RefUnwindSafe for SplitNode<BranchData, LeafData>where
BranchData: RefUnwindSafe,
LeafData: RefUnwindSafe,
impl<BranchData, LeafData> Send for SplitNode<BranchData, LeafData>
impl<BranchData, LeafData> Sync for SplitNode<BranchData, LeafData>
impl<BranchData, LeafData> Unpin for SplitNode<BranchData, LeafData>
impl<BranchData, LeafData> UnwindSafe for SplitNode<BranchData, LeafData>where
BranchData: UnwindSafe,
LeafData: 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