Function std::cast::transmute

pub unsafe fn transmute<L, G>(thing: L) -> G

Transform a value of one type into a value of another type. Both types must have the same size and alignment.

Example

let v: &[u8] = transmute("L");
assert!(v == [76u8]);