[][src]Module abi_stable::utils

Utility functions.

Structs

PanicInfo

Information about a panic,used in ffi_panic_message.

Functions

distance_from

This function allows calculating the distance (in Ts) from from to to.

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.

ref_as_nonnull

Coverts a &T to a NonNull<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.