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§
Sourcetype Internal: InternalNodeId
type Internal: InternalNodeId
Internal (backend) node ID type.
Required Methods§
Sourcefn from_internal(id: Self::Internal) -> Self
fn from_internal(id: Self::Internal) -> Self
Converts the custom ID type to the internal node ID type.
Sourcefn to_internal(self) -> Self::Internal
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.