Skip to main content

TopTreeSpec

Trait TopTreeSpec 

Source
pub trait TopTreeSpec: Sized {
    type Info;
    type Point: Clone;
    type Path: Clone;

    // Required methods
    fn vertex(info: &Self::Info) -> Self::Path;
    fn add_vertex(point: &Self::Point, info: &Self::Info) -> Self::Path;
    fn add_edge(path: &Self::Path) -> Self::Point;
    fn rake(left: &Self::Point, right: &Self::Point) -> Self::Point;
    fn compress(left: &Self::Path, right: &Self::Path) -> Self::Path;
    fn reverse(path: &mut Self::Path);
}
Expand description

compress must be associative and rake must be associative and commutative. reverse must be an involution and reverse the operand order of compress.

Required Associated Types§

Required Methods§

Source

fn vertex(info: &Self::Info) -> Self::Path

Source

fn add_vertex(point: &Self::Point, info: &Self::Info) -> Self::Path

Source

fn add_edge(path: &Self::Path) -> Self::Point

Source

fn rake(left: &Self::Point, right: &Self::Point) -> Self::Point

Source

fn compress(left: &Self::Path, right: &Self::Path) -> Self::Path

Source

fn reverse(path: &mut Self::Path)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§