pub trait BaseNode: Node<Base = Self> {
type Representation;
type Branch: BranchNode;
type Leaf: Node;
// Required method
fn into_representation(
self,
arena: &mut Arena<Self>,
) -> Self::Representation
where Self: Sized;
}
Required Associated Types§
Sourcetype Representation
type Representation
The representation of the node after it is removed from the arena.
If this is a branch node, this representation should include its children.
Sourcetype Branch: BranchNode
type Branch: BranchNode
The type used for branch nodes.
This may be the base node itself, or a separate node type.
Required Methods§
Sourcefn into_representation(self, arena: &mut Arena<Self>) -> Self::Representationwhere
Self: Sized,
fn into_representation(self, arena: &mut Arena<Self>) -> Self::Representationwhere
Self: Sized,
Converts this node into its representation.
If this is a branch node, this node’s children should be removed from the arena
and
included in the representation.
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§
Source§impl<BranchData, LeafData> BaseNode for SplitNode<BranchData, LeafData>
Available on crate feature split
only.
impl<BranchData, LeafData> BaseNode for SplitNode<BranchData, LeafData>
Available on crate feature
split
only.Source§impl<BranchData, LeafData> BaseNode for SplitNodeDeque<BranchData, LeafData>
Available on crate features deque
and split
only.
impl<BranchData, LeafData> BaseNode for SplitNodeDeque<BranchData, LeafData>
Available on crate features
deque
and split
only.type Representation = SplitNodeRepresentation<BranchData, LeafData>
type Branch = BranchDeque<BranchData, LeafData>
type Leaf = LeafDeque<BranchData, LeafData>
Source§impl<Data: Debug> BaseNode for UnifiedNode<Data>
Available on crate feature unified
only.
impl<Data: Debug> BaseNode for UnifiedNode<Data>
Available on crate feature
unified
only.type Representation = UnifiedNodeRepresentation<Data>
type Branch = UnifiedNode<Data>
type Leaf = UnifiedNode<Data>
Source§impl<Data: Debug> BaseNode for UnifiedNodeDeque<Data>
Available on crate features deque
and unified
only.
impl<Data: Debug> BaseNode for UnifiedNodeDeque<Data>
Available on crate features
deque
and unified
only.