Trait Label

Source
pub trait Label
where Self: Sized + Copy + Eq + Hash + Debug,
{ type Index: Eq + Copy + Hash + Debug + Index + 'static; // Required methods fn variants() -> &'static [Self]; fn indexes(&self) -> &'static [Self::Index]; fn ordinal(&self) -> usize; fn name(&self) -> &'static str; }
Expand description

A label for an Element. This can be either a vertex or an edge.

Required Associated Types§

Source

type Index: Eq + Copy + Hash + Debug + Index + 'static

Information about indexes for this label

Required Methods§

Source

fn variants() -> &'static [Self]

All label variants

Source

fn indexes(&self) -> &'static [Self::Index]

The indexes associated with this label

Source

fn ordinal(&self) -> usize

A unique ordinal for this label

Source

fn name(&self) -> &'static str

The name of the label

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.

Implementations on Foreign Types§

Source§

impl Label for ()

Source§

fn variants() -> &'static [Self]

The anonymous label

Source§

type Index = ()

Source§

fn indexes(&self) -> &'static [Self::Index]

Source§

fn ordinal(&self) -> usize

Source§

fn name(&self) -> &'static str

Implementors§