Struct Alignment

Source
#[non_exhaustive]
pub struct Alignment<const N: usize>;
Expand description

Marker type to specify the alignment of AlignedZst in the type system.

For valid alignments N, Alignment<N> implements SupportedAlignment.

Trait Implementations§

Source§

impl SupportedAlignment for Alignment<1>

Source§

impl SupportedAlignment for Alignment<1024>

Source§

impl SupportedAlignment for Alignment<1048576>

Source§

impl SupportedAlignment for Alignment<128>

Source§

impl SupportedAlignment for Alignment<131072>

Source§

impl SupportedAlignment for Alignment<134217728>

Source§

impl SupportedAlignment for Alignment<16>

Source§

impl SupportedAlignment for Alignment<16384>

Source§

impl SupportedAlignment for Alignment<16777216>

Source§

impl SupportedAlignment for Alignment<2>

Source§

impl SupportedAlignment for Alignment<2048>

Source§

impl SupportedAlignment for Alignment<2097152>

Source§

impl SupportedAlignment for Alignment<256>

Source§

impl SupportedAlignment for Alignment<262144>

Source§

impl SupportedAlignment for Alignment<268435456>

Source§

impl SupportedAlignment for Alignment<32>

Source§

impl SupportedAlignment for Alignment<32768>

Source§

impl SupportedAlignment for Alignment<33554432>

Source§

impl SupportedAlignment for Alignment<4>

Source§

impl SupportedAlignment for Alignment<4096>

Source§

impl SupportedAlignment for Alignment<4194304>

Source§

impl SupportedAlignment for Alignment<512>

Source§

impl SupportedAlignment for Alignment<524288>

Source§

impl SupportedAlignment for Alignment<536870912>

Source§

impl SupportedAlignment for Alignment<64>

Source§

impl SupportedAlignment for Alignment<65536>

Source§

impl SupportedAlignment for Alignment<67108864>

Source§

impl SupportedAlignment for Alignment<8>

Source§

impl SupportedAlignment for Alignment<8192>

Source§

impl SupportedAlignment for Alignment<8388608>

Auto Trait Implementations§

§

impl<const N: usize> Freeze for Alignment<N>

§

impl<const N: usize> RefUnwindSafe for Alignment<N>

§

impl<const N: usize> Send for Alignment<N>

§

impl<const N: usize> Sync for Alignment<N>

§

impl<const N: usize> Unpin for Alignment<N>

§

impl<const N: usize> UnwindSafe for Alignment<N>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.