aligned_array

Trait AsAlignedChunks

Source
pub trait AsAlignedChunks<A: Alignment, M: ArrayLength<u8> + PartialDiv<A::Num>> {
    // Required methods
    fn as_aligned_chunks(&self) -> &[Aligned<A, GenericArray<u8, M>>];
    fn as_mut_aligned_chunks(
        &mut self,
    ) -> &mut [Aligned<A, GenericArray<u8, M>>];
}
Expand description

Trait for types which can be viewed as aligned chunks of bytes This should generally just be, larger chunks of dumb bytes or similar.

Required Methods§

Source

fn as_aligned_chunks(&self) -> &[Aligned<A, GenericArray<u8, M>>]

Break self into aligned chunks of size M. This is not required to cover all the bytes of Self, trailing bytes that don’t fit may be left off.

Source

fn as_mut_aligned_chunks(&mut self) -> &mut [Aligned<A, GenericArray<u8, M>>]

Break self into mutable aligned chunks of size M. This is not required to cover all the bytes of Self, but must agree with as_aligned_chunks.

Implementors§

Source§

impl<A, A2, N, M> AsAlignedChunks<A2, M> for Aligned<A, GenericArray<u8, N>>
where A: Alignment, A2: Alignment, A2::Num: IsLessOrEqual<A::Num, Output = B1>, N: ArrayLength<u8>, M: ArrayLength<u8> + PartialDiv<A2::Num>,