Function lrs::mem::is_suitable_for

Returns whether a buffer is suitable to hold an object of a certain type.

Syntax

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

Arguments

NameDescription
buf

The buffer to be checked.

Remarks

The buffer is suitable if it is large enough to hold the type and properly aligned.