Function pre::core::mem::transmute_copy[][src]

pub unsafe fn transmute_copy<T, U>(src: &T) -> U
Expand description

core::mem::transmute_copy with preconditions.

This function behaves exactly like core::mem::transmute_copy, but also has preconditions checked by pre.

You should also read the Safety section on the documentation of core::mem::transmute_copy.

This function has preconditions

This function has the following precondition generated by the pre attribute:

  • I have read and understood https://doc.rust-lang.org/nightly/nomicon/transmutes.html

To call the function you need to assure that the precondition holds:

#[assure(
    "I have read and understood https://doc.rust-lang.org/nightly/nomicon/transmutes.html",
    reason = "<specify the reason why you can assure this here>"
)]
transmute_copy(/* parameters omitted */);