NodeId

Trait NodeId 

Source
pub trait NodeId:
    Copy
    + Eq
    + Hash
    + Debug {
    type Internal: InternalNodeId;

    // Required methods
    fn from_internal(id: Self::Internal) -> Self;
    fn to_internal(self) -> Self::Internal;
}
Expand description

A trait for node ID types.

Required Associated Types§

Source

type Internal: InternalNodeId

Internal (backend) node ID type.

Required Methods§

Source

fn from_internal(id: Self::Internal) -> Self

Converts the custom ID type to the internal node ID type.

Source

fn to_internal(self) -> Self::Internal

Converts the internal node ID type to the custom ID 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§