pub fn bytes_from_data(data: &Data) -> Result<Cow<'_, [u8]>, DataError>
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.
data
Data::Bytes
Data::Buffer