Trait HasStaticVTable

Source
pub unsafe trait HasStaticVTable<VT>
where VT: ?Sized + VTableMeta,
{ // Required method fn static_vtable() -> &'static VT::VTable; }
Expand description

Allow to associate a VTable with a type.

§Safety

The VTABLE and STATIC_VTABLE need to be a valid virtual table corresponding to pointer to Self instance.

Required Methods§

Source

fn static_vtable() -> &'static VT::VTable

Safety: must be a valid VTable for Self

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§