Skip to main content

Edge

Trait Edge 

Source
pub trait Edge: Field + Indexed {
    type From: Node;
    type To: Node;

    const LABEL: &'static str;
}
Expand description

A type that is an edge in a graph.

The two ends are in the type, which is the whole point: a hop that a node type cannot start is a type error rather than an empty answer, and an edge put between the wrong pair does not compile.

An edge has no id, because an edge is identified by where it is rather than by a field, so this is a Field and an Indexed rather than a Document.

Required Associated Constants§

Source

const LABEL: &'static str

What this type is called in the graph.

Required Associated Types§

Source

type From: Node

The node type an edge of this kind starts at.

Source

type To: Node

The node type an edge of this kind ends at.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§