pub unsafe trait ConstVTableOf<T: Dynamic<Self::Bounds>>: VTableOf<T> {
const INSTANCE: Self;
}Expand description
Generate VTable instance for type in const context.
The type T must satisfy the dynamic trait bounds given by Self::Bounds.
This is the const form of VTableOf. Because traits can’t have const methods
the instance is an associated constant.
§Safety
- The vtable instance
Self::INSTANCEmust be for the typeT. This meansVTable::descriptor().is_type::<T>()must returntrue.
Required Associated Constants§
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.