scale_info

Trait StaticTypeInfo

source
pub trait StaticTypeInfo: TypeInfo + 'static { }
Expand description

Convenience trait for implementors, combining TypeInfo and 'static bounds.

§Note

Currently because of the 'static constraint on std::any::TypeId::of (see MetaType), TypeInfo constraints must also be accompanied by a 'static bound. This trait is useful to implementors so only a single constraint is required.

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§

source§

impl<T> StaticTypeInfo for T
where T: TypeInfo + 'static,