pub unsafe trait VTableOf<T: Dynamic<Self::Bounds>>: VTable {
// Required method
fn instance() -> Self;
}Expand description
Generate VTable instance for type.
The type T must satisfy the dynamic trait bounds given by Self::Bounds.
§Safety
- The vtable instance
Self::instance()returns must be for the typeT. This meansVTable::descriptor().is_type::<T>()must returntrue. - The
Self::instance()method must not panic.
Required Methods§
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.