Function lrs::mem::align_for

Left-trims a byte slice so that the first element is aligned.

Syntax

fn align_for<T>(buf: &[u8]) -> &[u8]

Arguments

NameDescription
buf

The slice to be trimmed.

Remarks

That is, if the returned slice is not empty, the address of the first element is a multiple of the alignment of T.