[−][src]Function gvariant::aligned_bytes::align_offset
pub fn align_offset<A: Alignment>(idx: usize) -> AlignedOffset<A>
Construct an AlignedOffset
by rounding-up idx
until it's a multiple of
A::ALIGNMENT
.
This is useful for GVariant deserialisation because often we have an offset representing the end of a value and we want to find the start of the next one. This involves padding according to the next value's alignment.