Skip to main content

Vtable

Trait Vtable 

Source
pub unsafe trait Vtable: 'static { }
Expand description

Implemented by every generated #[repr(C)] vtable struct, whose first field is its VtableHeader.

§Safety

The implementing type must be #[repr(C)] and start with a VtableHeader, so a pointer to it is also a valid pointer to the header; ForeignCallback reads the header before trusting the rest.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§