Function mem_util::bytes_from_data
source · pub fn bytes_from_data<'d>(data: &'d Data) -> Result<Cow<'d, [u8]>, DataError>
Expand description
Retrieve the bytes in data
, returning a reference if it’s a Data::Bytes
and a copy of
the bytes read from the VMO if it’s a Data::Buffer
.