[][src]Trait gvariant::aligned_bytes::Alignment

pub unsafe trait Alignment: Debug {
    const ALIGNMENT: usize;
}

A trait for our alignment structs A1, A2, A4 and A8.

Ideally we'd just use const-generics here, but they're not available on the rust stable channel yet. This is the type-level equivalent of enum Alignment {A1 = 1, A2 = 2, A4 = 4, A8 = 8}.

This is unsafe because it must only be implemented for zero-sized types. Do not implement this trait. The implementations in this module should be the only implementations.

Associated Constants

Loading content...

Implementors

impl Alignment for A1[src]

impl Alignment for A2[src]

impl Alignment for A4[src]

impl Alignment for A8[src]

Loading content...