☰
In bytemuck
Modules
allocation
checked
Macros
offset_of
Enums
PodCastError
Traits
AnyBitPattern
Contiguous
NoUninit
Pod
PodInOption
TransparentWrapper
Zeroable
ZeroableInOption
Functions
bytes_of
bytes_of_mut
cast
cast_mut
cast_ref
cast_slice
cast_slice_mut
from_bytes
from_bytes_mut
pod_align_to
pod_align_to_mut
pod_read_unaligned
try_cast
try_cast_mut
try_cast_ref
try_cast_slice
try_cast_slice_mut
try_from_bytes
try_from_bytes_mut
try_pod_read_unaligned
?
Function
bytemuck
::
cast
source
·
[
−
]
pub fn cast<A:
NoUninit
, B:
AnyBitPattern
>(a: A) -> B
Expand description
Cast
T
into
U
Panics
This is like
try_cast
, but will panic on a size mismatch.