pub trait Destructor: Send + Sync {
// Required method
unsafe fn destroy(&self, pointer: *mut ());
}Expand description
Drops a value whose type has no Rust counterpart.
A Rust type drops itself through Finalize::finalize_raw, which is a
plain function pointer. A runtime type has no such function, because the
type is a list of fields that is known only at runtime. The object that
holds the field list implements this trait instead.
intuicio-core implements it on Type, which drops each field in turn.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".