cast
bytemuck
1.22.0
cast
Sections
Panics
In crate bytemuck
Modules
allocation
anybitpattern
checked
contiguous
internal
no_uninit
offset_of
pod
pod_in_option
transparent
zeroable
zeroable_in_option
Macros
impl_unsafe_marker_for_simd
maybe_const_fn
offset_of
transmute
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
fill_zeroes
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
write_zeroes
Derive Macros
AnyBitPattern
ByteEq
ByteHash
CheckedBitPattern
Contiguous
NoUninit
Pod
TransparentWrapper
Zeroable
bytemuck
Function
cast
Copy item path
Settings
Help
Summary
Source
pub fn cast<A:
NoUninit
, B:
AnyBitPattern
>(a: A) -> B
Expand description
Cast
A
into
B
§
Panics
This is like
try_cast
, but will panic on a size mismatch.