Function buf_trait::layout_of

source ·
pub const fn layout_of<B: ?Sized + Buf>(buf: &B) -> Layout
Expand description

Computes the layout of buf.

This function is const, unlike Layout::for_value().