Trait zerocopy::Unaligned[][src]

pub unsafe trait Unaligned { }

Types with no alignment requirement.

WARNING: Do not implement this trait yourself! Instead, use #[derive(Unaligned)].

If T: Unaligned, then align_of::<T>() == 1.

Safety

If T: Unaligned, then unsafe code may assume that it is sound to produce a reference to T at any memory location regardless of alignment. If a type is marked as Unaligned which violates this contract, it may cause undefined behavior.

Implementations on Foreign Types

impl<T> Unaligned for PhantomData<T>[src]

Loading content...

Implementors

impl Unaligned for ()[src]

impl Unaligned for i8[src]

impl Unaligned for u8[src]

impl<O: ByteOrder> Unaligned for I16<O> where
    PhantomData<O>: Unaligned
[src]

impl<O: ByteOrder> Unaligned for I32<O> where
    PhantomData<O>: Unaligned
[src]

impl<O: ByteOrder> Unaligned for I64<O> where
    PhantomData<O>: Unaligned
[src]

impl<O: ByteOrder> Unaligned for I128<O> where
    PhantomData<O>: Unaligned
[src]

impl<O: ByteOrder> Unaligned for U16<O> where
    PhantomData<O>: Unaligned
[src]

impl<O: ByteOrder> Unaligned for U32<O> where
    PhantomData<O>: Unaligned
[src]

impl<O: ByteOrder> Unaligned for U64<O> where
    PhantomData<O>: Unaligned
[src]

impl<O: ByteOrder> Unaligned for U128<O> where
    PhantomData<O>: Unaligned
[src]

impl<T: Unaligned> Unaligned for [T][src]

impl<T: Unaligned, const N: usize> Unaligned for [T; N][src]

Loading content...