[][src]Trait gvariant::aligned_bytes::AlignedTo

pub unsafe trait AlignedTo<A: Alignment>: Alignment { }

This is a promise that the type is aligned as described by A.

It is unsafe because safe code must be able to assume the given alignment for e.g. pointer casts.

It can be used as a type constraint in where clauses like so:

where A : AlignedTo<A4>

which means:

This example is not tested
where A::ALIGNMENT >= 4

Implementors

impl AlignedTo<A1> for A1[src]

impl AlignedTo<A1> for A2[src]

impl AlignedTo<A1> for A4[src]

impl AlignedTo<A1> for A8[src]

impl AlignedTo<A2> for A2[src]

impl AlignedTo<A2> for A4[src]

impl AlignedTo<A2> for A8[src]

impl AlignedTo<A4> for A4[src]

impl AlignedTo<A4> for A8[src]

impl AlignedTo<A8> for A8[src]

Loading content...