Casts an object to another type.
Returns the same object but interpreted as an object of type U.
unsafe extern "rust-intrinsic" fn transmute<T, U>(val: T) -> U
| Name | Description |
|---|---|
| val | The object to be cast. |
The returned object has the same memory representation as the argument. The types must have the same size. This is checked at compile time.