Module bytes_cast::unaligned
source · Expand description
Integer and float types without alignment requirement, for each endianness.
They implement BytesCast
as well as standard convertion traits
to and from the corresponding primitive integer type.
The u8
type
There is no need for types such as U8Be
since u8
already does not have endianness or alignement requirements.
Use u8
directly.
Structs
Big-endian
f32
, without alignment requirement.Little-endian
f32
, without alignment requirement.CPU-native-endian
f32
, without alignment requirement.Big-endian
f64
, without alignment requirement.Little-endian
f64
, without alignment requirement.CPU-native-endian
f64
, without alignment requirement.Big-endian
i16
, without alignment requirement.Little-endian
i16
, without alignment requirement.CPU-native-endian
i16
, without alignment requirement.Big-endian
i32
, without alignment requirement.Little-endian
i32
, without alignment requirement.CPU-native-endian
i32
, without alignment requirement.Big-endian
i64
, without alignment requirement.Little-endian
i64
, without alignment requirement.CPU-native-endian
i64
, without alignment requirement.Big-endian
i128
, without alignment requirement.Little-endian
i128
, without alignment requirement.CPU-native-endian
i128
, without alignment requirement.Big-endian
u16
, without alignment requirement.Little-endian
u16
, without alignment requirement.CPU-native-endian
u16
, without alignment requirement.Big-endian
u32
, without alignment requirement.Little-endian
u32
, without alignment requirement.CPU-native-endian
u32
, without alignment requirement.Big-endian
u64
, without alignment requirement.Little-endian
u64
, without alignment requirement.CPU-native-endian
u64
, without alignment requirement.Big-endian
u128
, without alignment requirement.Little-endian
u128
, without alignment requirement.CPU-native-endian
u128
, without alignment requirement.