syntree

Trait Flavor

Source
pub trait Flavor {
    type Error;
    type Index: Index<Length = Self::Length>;
    type Length: Length;
    type Width: Width<Pointer = Self::Pointer>;
    type Pointer: Pointer;
    type Storage<T>: Storage<T, Error = Self::Error>;
    type Indexes: Storage<TreeIndex<Self>, Error = Self::Error>;
}
Expand description

The flavor of a tree.

This should not be implemented directly, instead see the flavor! macro.

The Index associated type is constrained by the Index trait, and determines the numerical bounds of spans the tree.

The Width associated type determines the bounds of pointers in the tree through the Width trait, this decides how many elements that can be stored in the tree.

Required Associated Types§

Source

type Error

The error raised by the type of the tree.

Source

type Index: Index<Length = Self::Length>

The type of an index used by a tree.

Source

type Length: Length

The length used in the flavor.

Source

type Width: Width<Pointer = Self::Pointer>

The width used in the flavor.

Source

type Pointer: Pointer

The pointer in use.

Source

type Storage<T>: Storage<T, Error = Self::Error>

The storage type used in the tree.

Source

type Indexes: Storage<TreeIndex<Self>, Error = Self::Error>

How indexes are stored in the tree.

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§