Function abi_stable::utils::transmute_reference

source ·
pub const unsafe fn transmute_reference<T, U>(ref_: &T) -> &U
Expand description

Transmute a reference to another reference, changing the referent’s type.

§Safety

This has the same safety concerns that std::mem::transmute has, including that T has to have an alignment and be compatible with U.