Skip to main content

Alignment

Trait Alignment 

Source
pub trait Alignment {
    const VALUE: PowerOfTwo;
}
Expand description

Type-level memory-alignment witness for AlignedRead. Each implementor is a unit type carrying a single PowerOfTwo value.

Custom readers can define their own marker (e.g. A4096) by adding a unit type and an impl Alignment with the desired VALUE.

Required Associated Constants§

Source

const VALUE: PowerOfTwo

The alignment, in bytes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Alignment for A1

Source§

const VALUE: PowerOfTwo = PowerOfTwo::V1

Source§

impl Alignment for A512

Source§

const VALUE: PowerOfTwo = PowerOfTwo::V512