Trait BaseNode

Source
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§

Source

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.

Source

type Branch: BranchNode

The type used for branch nodes.

This may be the base node itself, or a separate node type.

Source

type Leaf: Node

The type used for leaf nodes.

This may be the base node itself, or a separate node type.

Required Methods§

Source

fn into_representation(self, arena: &mut Arena<Self>) -> Self::Representation
where 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>
where BranchData: Debug, LeafData: Debug,

Available on crate feature split only.
Source§

type Representation = SplitNodeRepresentation<BranchData, LeafData>

Source§

type Branch = Branch<BranchData, LeafData>

Source§

type Leaf = Leaf<BranchData, LeafData>

Source§

impl<BranchData, LeafData> BaseNode for SplitNodeDeque<BranchData, LeafData>
where BranchData: Debug, LeafData: Debug,

Available on crate features deque and split only.
Source§

type Representation = SplitNodeRepresentation<BranchData, LeafData>

Source§

type Branch = BranchDeque<BranchData, LeafData>

Source§

type Leaf = LeafDeque<BranchData, LeafData>

Source§

impl<Data: Debug> BaseNode for UnifiedNode<Data>

Available on crate feature unified only.
Source§

impl<Data: Debug> BaseNode for UnifiedNodeDeque<Data>

Available on crate features deque and unified only.