Struct aligned_array::Aligned[][src]

#[repr(C)]pub struct Aligned<A, T> where
    T: ?Sized
{ /* fields omitted */ }

A newtype with alignment of at least A bytes

Trait Implementations

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>, 
[src]

impl<'a, A, A2, T> AsMut<Aligned<A, T>> for &'a mut Aligned<A2, T> where
    A: Alignment,
    A2: Alignment,
    A::Num: IsLessOrEqual<A2::Num, Output = B1>, 
[src]

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]

impl<'a, A, A2, T> AsRef<Aligned<A, T>> for &'a Aligned<A2, T> where
    A: Alignment,
    A2: Alignment,
    A::Num: IsLessOrEqual<A2::Num, Output = B1>, 
[src]

impl<A, T> Clone for Aligned<A, T> where
    A: Alignment,
    T: Clone
[src]

impl<A, T> Debug for Aligned<A, T> where
    A: Alignment,
    T: Debug
[src]

impl<A, T> Default for Aligned<A, T> where
    A: Alignment,
    T: Default
[src]

impl<A, T> Deref for Aligned<A, T> where
    A: Alignment,
    T: ?Sized
[src]

type Target = T

The resulting type after dereferencing.

impl<A, T> DerefMut for Aligned<A, T> where
    A: Alignment,
    T: ?Sized
[src]

impl<A, T> Display for Aligned<A, T> where
    A: Alignment,
    T: Display
[src]

impl<A, T> Eq for Aligned<A, T> where
    A: Alignment,
    T: Eq
[src]

impl<A, T, V> FromIterator<V> for Aligned<A, T> where
    A: Alignment,
    T: FromIterator<V>, 
[src]

impl<A, T, N> GenericSequence<T> for Aligned<A, GenericArray<T, N>> where
    N: ArrayLength<T>,
    A: Alignment, 
[src]

Implement generic_array::GenericSequence for Aligned sequences

type Length = N

GenericArray associated length

type Sequence = Self

Concrete sequence type used in conjuction with reference implementations of GenericSequence

impl<A, T> Hash for Aligned<A, T> where
    A: Alignment,
    T: Hash
[src]

impl<A, T> Index<RangeTo<usize>> for Aligned<A, [T]> where
    A: Alignment, 
[src]

type Output = Aligned<A, [T]>

The returned type after indexing.

impl<A, T> IntoIterator for Aligned<A, T> where
    A: Alignment,
    T: IntoIterator
[src]

type Item = T::Item

The type of the elements being iterated over.

type IntoIter = T::IntoIter

Which kind of iterator are we turning this into?

impl<'a, A, T> IntoIterator for &'a Aligned<A, T> where
    A: Alignment,
    &'a T: IntoIterator
[src]

type Item = <&'a T as IntoIterator>::Item

The type of the elements being iterated over.

type IntoIter = <&'a T as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

impl<'a, A, T> IntoIterator for &'a mut Aligned<A, T> where
    A: Alignment,
    &'a mut T: IntoIterator
[src]

type Item = <&'a mut T as IntoIterator>::Item

The type of the elements being iterated over.

type IntoIter = <&'a mut T as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

impl<A, T> Ord for Aligned<A, T> where
    A: Alignment,
    T: Ord
[src]

impl<A, T> PartialEq<Aligned<A, T>> for Aligned<A, T> where
    A: Alignment,
    T: PartialEq
[src]

impl<A, T> PartialOrd<Aligned<A, T>> for Aligned<A, T> where
    A: Alignment,
    T: PartialOrd
[src]

impl<'a, A, N, K> Split<u8, K> for &'a Aligned<A, GenericArray<u8, N>> where
    A: Alignment,
    N: ArrayLength<u8> + Sub<K>,
    K: ArrayLength<u8> + PartialDiv<A::Num> + 'static,
    Diff<N, K>: ArrayLength<u8>, 
[src]

Implement generic_array::Split api for aligned bytes in a way that preserves aligment info TODO: This could be more generic, but we didn't need it yet. Instead of u8, a generic value T?

type First = &'a Aligned<A, GenericArray<u8, K>>

First part of the resulting split array

type Second = &'a Aligned<A, GenericArray<u8, Diff<N, K>>>

Second part of the resulting split array

impl<'a, A, N, K> Split<u8, K> for &'a mut Aligned<A, GenericArray<u8, N>> where
    A: Alignment,
    N: ArrayLength<u8> + Sub<K>,
    K: ArrayLength<u8> + PartialDiv<A::Num> + 'static,
    Diff<N, K>: ArrayLength<u8>, 
[src]

Implement generic_array::Split API for aligned bytes in a way that preserves aligment info TODO: This could be more generic, but we didn't need it yet. Instead of u8, a generic value T?

type First = &'a mut Aligned<A, GenericArray<u8, K>>

First part of the resulting split array

type Second = &'a mut Aligned<A, GenericArray<u8, Diff<N, K>>>

Second part of the resulting split array

Auto Trait Implementations

impl<A, T: ?Sized> Send for Aligned<A, T> where
    A: Send,
    T: Send
[src]

impl<A, T: ?Sized> Sync for Aligned<A, T> where
    A: Sync,
    T: Sync
[src]

impl<A, T: ?Sized> Unpin for Aligned<A, T> where
    A: Unpin,
    T: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.