as_bytes

Function as_bytes 

Source
pub const fn as_bytes<B: ?Sized + Buf>(buf: &B) -> &[u8]
Expand description

Converts a reference to a Buf into its underlying bytes.

Unlike Buf::as_bytes(), this function is const.