Trait Named
pub trait Named: Sized + 'static {
// Required method
fn typename() -> &'static str;
// Provided methods
fn typehash() -> u64 { ... }
fn typeid() -> TypeId { ... }
fn port() -> u64 { ... }
fn arm(&self) -> Option<&'static str> { ... }
unsafe fn arm_unchecked(self_: *const ()) -> Option<&'static str> { ... }
}Expand description
A Named type is a type that has a globally unique name.
Required Methods§
Provided Methods§
fn typeid() -> TypeId
fn typeid() -> TypeId
The TypeId for this type. TypeIds are unique only within a binary, and should not be used for global identification.
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.