pub trait TypeAlias {
// Required method
fn register_alias(name: &str, registry: &mut TypeRegistry);
}
Expand description
A trait for types that can be registered as aliases.
Users shouldn’t usually need to impl this - a blanket impl is provided
for all types that impl TypeMetadata
.
Required Methods§
Sourcefn register_alias(name: &str, registry: &mut TypeRegistry)
fn register_alias(name: &str, registry: &mut TypeRegistry)
Registers this type as a type alias.
Note that this should not be used on types which have TypeMetadata
derived on them - it’s only really meant for use on actual rust type
aliases.
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.