pub unsafe trait VTableMeta { type Target; type VTable: 'static; }
Internal trait that is implemented by the #[vtable] macro.
#[vtable]
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.
VTable::VTable::new<T>
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
2*size_of::<usize>
repr(C)
(vtable, ptr)
That’s the VTable itself (so most likely Self)