[][src]Function linux::lmem::copy_as

pub unsafe fn copy_as<T, U>(src: &T) -> U

Copies an object and casts the result to another type.

[argument, val] The object to be copied.

= Remarks

T and U can have different sizes but if the size of U is larger than T and reading from the trailing bytes causes invalid memory access, the behavior is undefined.