pub trait Staticize {
type Static: 'static + ?Sized;
// Provided methods
fn static_type_id() -> TypeId { ... }
fn static_type_name() -> &'static str { ... }
}
Expand description
Provides a handy Static
associated type which should resolve to a 'static
version of
T
for all T
that implement Staticize
.
Required Associated Types§
Provided Methods§
Sourcefn static_type_id() -> TypeId
fn static_type_id() -> TypeId
Returns the TypeId
of the 'static
version of T
Sourcefn static_type_name() -> &'static str
fn static_type_name() -> &'static str
Returns the type name of the 'static
version of T
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.