Trait vtable::VTableMeta

source ·
pub unsafe trait VTableMeta {
    type Target;
    type VTable: 'static;
}
Expand description

Internal trait that is implemented by the #[vtable] macro.

§Safety

The Target object needs to be implemented correctly. And there should be a VTable::VTable::new<T> function that returns a VTable suitable for the type T.

Required Associated Types§

source

type Target

That’s the trait object that implements the functions

NOTE: the size must be 2*size_of::<usize> and a repr(C) with (vtable, ptr) so it has the same layout as the inner and VBox/VRef/VRefMut

source

type VTable: 'static

That’s the VTable itself (so most likely Self)

Implementors§