Expand description
Utility functions.
Structs§
- Panic
Info - Information about a panic, used in
ffi_panic_message
.
Functions§
- distance_
from - This function allows calculating the distance (in
T
s) fromfrom
toto
. - ffi_
panic_ message - Prints an error message for attempting to panic across the ffi boundary and aborts the process.
- leak_
value - Leaks
value
into the heap, and returns a reference to it. - manuallydrop_
as_ raw_ mut - Casts a
&'a mut ManuallyDrop<T>
to*mut T
- manuallydrop_
as_ rmut - Casts a
&'a mut ManuallyDrop<T>
toRMut<'a, T>
- ref_
as_ nonnull - Converts a
&T
to aNonNull<T>
. - take_
manuallydrop ⚠ - Takes the contents out of a
ManuallyDrop<T>
. - transmute_
mut_ ⚠reference - Transmute a mutable reference to another mutable reference, changing the referent’s type.
- transmute_
reference ⚠ - Transmute a reference to another reference, changing the referent’s type.
Unions§
- Transmuter
- Helper type for transmuting between
Copy
types without adding any overhead in debug builds.