Function lrs::mem::transmute

Casts an object to another type.

Returns the same object but interpreted as an object of type U.

Syntax

unsafe extern "rust-intrinsic" fn transmute<T, U>(val: T) -> U

Arguments

NameDescription
val

The object to be cast.

Remarks

The returned object has the same memory representation as the argument. The types must have the same size. This is checked at compile time.

See also