Trait VertexType

Source
pub trait VertexType: Eq + Copy {
    type IdentifierType: Copy + Eq + PartialOrd + AddAssign<Self::IdentifierType>;

    // Required methods
    fn id(&self) -> Self::IdentifierType;
    fn usize(a: Self::IdentifierType) -> usize;
}
Expand description

Any type that can be used to index internal buffer

Required Associated Types§

Required Methods§

Source

fn id(&self) -> Self::IdentifierType

Source

fn usize(a: Self::IdentifierType) -> usize

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 VertexType for u8

Source§

type IdentifierType = u8

Source§

fn id(&self) -> Self

Source§

fn usize(a: Self) -> usize

Source§

impl VertexType for u16

Source§

type IdentifierType = u16

Source§

fn id(&self) -> Self

Source§

fn usize(a: Self) -> usize

Source§

impl VertexType for u32

Source§

type IdentifierType = u32

Source§

fn id(&self) -> Self

Source§

fn usize(a: Self) -> usize

Source§

impl VertexType for u64

Source§

type IdentifierType = u64

Source§

fn id(&self) -> Self

Source§

fn usize(a: Self) -> usize

Source§

impl VertexType for usize

Source§

type IdentifierType = usize

Source§

fn id(&self) -> Self

Source§

fn usize(a: Self) -> usize

Implementors§