Module abi_stable::utils
source · Expand description
Utility functions.
Structs§
- Information about a panic, used in
ffi_panic_message
.
Functions§
- This function allows calculating the distance (in
T
s) fromfrom
toto
. - Prints an error message for attempting to panic across the ffi boundary and aborts the process.
- Leaks
value
into the heap, and returns a reference to it. - Casts a
&'a mut ManuallyDrop<T>
to*mut T
- Casts a
&'a mut ManuallyDrop<T>
toRMut<'a, T>
- Converts a
&T
to aNonNull<T>
. - Takes the contents out of a
ManuallyDrop<T>
. - Transmute a mutable reference to another mutable reference, changing the referent’s type.
- Transmute a reference to another reference, changing the referent’s type.
Unions§
- Helper type for transmuting between
Copy
types without adding any overhead in debug builds.