Expand description
This module provides safe conversions between concrete typed instances and raw pointers for native data.
Box<dyn Any> is a fat pointer stored on the stack. Casting it directly
to a raw pointer will truncate its metadata. To preserve type information,
the fat pointer must be stored intact on the heap, so it can be safely
reconstructed from a raw pointer.
Traits§
- Data
- Should be implemented for all native data types to ensure safe pointer passing and correct memory management. Native data includes Extension Data, Context Data, and Function data.
Functions§
- drop_
from ⚠ - In typical usage of this crate, this function should not be called directly.
- from_
raw ⚠ - In typical usage of this crate, this function should not be called directly.
- into_
raw - In typical usage of this crate, this function should not be called directly.
- mut_
from ⚠ - In typical usage of this crate, this function should not be called directly.
- ref_
from ⚠ - In typical usage of this crate, this function should not be called directly.