pub const unsafe fn as_buf<B: ?Sized + Buf>(bytes: &[u8]) -> &B
Converts a byte slice to a reference to a Buf.
Buf
Unlike Buf::from_bytes(), this function is const.
Buf::from_bytes()
const
See Buf::from_bytes().