Trait aligned_array::AsNeSlice [−][src]
Trait for types which can be viewed as native-endian integer slices This should generally just be, aligned slices of dumb bytes or similar. (Indeed the only intended implementor is Aligned<A8, GenericArray<u8, N>>)
This should only be implemented when all the bytes in the underlying object can be accessed this way. So, the number of bytes should be divisible by 8 and aligned to an 8 byte boundary.
TODO: This could be 3 traits instead, one for each integer type, but we didn't need that yet.
Required methods
fn as_ne_u16_slice(&self) -> &[u16]
[src]
Represent the value as native-endian u16's
fn as_mut_ne_u16_slice(&mut self) -> &mut [u16]
[src]
Represent the value as mutable native-endian u16's
fn as_ne_u32_slice(&self) -> &[u32]
[src]
Represent the value as native-endian u32's
fn as_mut_ne_u32_slice(&mut self) -> &mut [u32]
[src]
Represent the value as mutable native-endian u32's
fn as_ne_u64_slice(&self) -> &[u64]
[src]
Represent the value as native-endian u64's
fn as_mut_ne_u64_slice(&mut self) -> &mut [u64]
[src]
Represent the value as mutable native-endian u64's
Implementors
impl<A, N> AsNeSlice for Aligned<A, GenericArray<u8, N>> where
A: Alignment,
A::Num: IsGreaterOrEqual<U8, Output = B1>,
N: ArrayLength<u8> + PartialDiv<U8>,
[src]
A: Alignment,
A::Num: IsGreaterOrEqual<U8, Output = B1>,
N: ArrayLength<u8> + PartialDiv<U8>,