Trait Aligned

Source
pub trait Aligned {
    // Required methods
    fn alignment_size() -> usize;
    fn offset(&self, count: isize) -> &Self;
}
Expand description

Common trait for AlignedBytes for all different alignments.

Required Methods§

Source

fn alignment_size() -> usize

Return the size of the alignment in bytes.

Source

fn offset(&self, count: isize) -> &Self

Return the slice of the bytes offset by count alignment units.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§