Trait Typed

Source
pub trait Typed: PartialEq<Self::Type> {
    type Type: TypeIdentifier;

    // Required method
    fn get_type(&self) -> Self::Type;
}

Required Associated Types§

Required Methods§

Source

fn get_type(&self) -> Self::Type

Retrieve a runtime representation of the type of the node or edge

PartialEq can then be used on the returned type to check if other nodes has the same type

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§

Source§

impl<K: Key, T: GenericTypeIdentifier> Typed for GenericWeight<K, T>

Source§

type Type = T

Source§

impl<NK: Key> Typed for AnyWeight<NK>

Source§

impl<Old: Typed, New: Typed> Typed for EitherVersion<Old, New>

Source§

type Type = EitherVersion<<Old as Typed>::Type, <New as Typed>::Type>