Trait rustc_data_structures::aligned::Aligned

source ·
pub unsafe trait Aligned {
    const ALIGN: Alignment;
Expand description

A type with a statically known alignment.


Self::ALIGN must be equal to the alignment of Self. For sized types it is mem::align_of<Self>(), for unsized types it depends on the type, for example [T] has alignment of T.

Required Associated Constants§


const ALIGN: Alignment

Alignment of Self.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§


impl<T> Aligned for [T]



impl<T> Aligned for T