pub trait PrimitiveSplit<T, const LEN: usize> {
// Required methods
fn into_array_be(self) -> [T; LEN] ⓘ;
fn into_array_le(self) -> [T; LEN] ⓘ;
fn into_array_ne(self) -> [T; LEN] ⓘ;
}
Available on crate feature
split
only.Expand description
Offers methods to split a primitive into an array of smaller primitives.
See also the Cast
type for the equivalent const methods, and the
PrimitiveJoin
trait for the opposite operations.
Required Methods§
Sourcefn into_array_be(self) -> [T; LEN] ⓘ
fn into_array_be(self) -> [T; LEN] ⓘ
Splits self
into an array of T
in big-endian order.
Sourcefn into_array_le(self) -> [T; LEN] ⓘ
fn into_array_le(self) -> [T; LEN] ⓘ
Splits self
into an array of T
in little-endian order.
Sourcefn into_array_ne(self) -> [T; LEN] ⓘ
fn into_array_ne(self) -> [T; LEN] ⓘ
Splits self
into an array of T
in native-endian order.