#[repr(C)]pub struct VTable {
pub size: usize,
pub align: usize,
pub drop_in_place: Option<unsafe extern "C" fn(*mut ())>,
pub dealloc: Option<unsafe extern "C" fn(*mut ())>,
pub _vfns: [unsafe extern "C" fn(*mut ()); 0],
}Expand description
A type which is layout compatible with a vtable from rfc 2955, but may not be relied upon to uphold the invariants of such a vtable
Fields§
§size: usizeThe value of core::mem::size_of_val for the object
align: usizeThe value of core::mem::align_of_val for the object
drop_in_place: Option<unsafe extern "C" fn(*mut ())>If present, points to a function which performs the destructor operation for the type
dealloc: Option<unsafe extern "C" fn(*mut ())>If present, points to a function which can deallocate pointers to this type
_vfns: [unsafe extern "C" fn(*mut ()); 0]Each entry points to the implementation of each trait function which can be called on a trait object in the declaration order in the trait.
Auto Trait Implementations§
impl Freeze for VTable
impl RefUnwindSafe for VTable
impl Send for VTable
impl Sync for VTable
impl Unpin for VTable
impl UnwindSafe for VTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more