pub trait AsAlignedChunks<A, M>where
    A: Alignment,
    M: ArrayLength<u8> + PartialDiv<<A as Alignment>::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 as Alignment>::Num: IsLessOrEqual<<A as Alignment>::Num, Output = B1>, N: ArrayLength<u8>, M: ArrayLength<u8> + PartialDiv<<A2 as Alignment>::Num>,