pub trait AsBytes {
// Required methods
fn as_bytes(&self) -> Cow<'_, [u8]>;
fn as_bytes_le(&self) -> Cow<'_, [u8]>;
fn as_bytes_be(&self) -> Cow<'_, [u8]>;
}Expand description
Provides functions to convert to MO files content as bytes
as_bytesmethod as an alias toas_bytes_le.as_bytes_lemethod to return the content as bytes in little endian byte order.as_bytes_bemethod to return the content as bytes in big endian byte order.
Required Methods§
Sourcefn as_bytes_le(&self) -> Cow<'_, [u8]>
fn as_bytes_le(&self) -> Cow<'_, [u8]>
Return the content as bytes in little endian encoding
Sourcefn as_bytes_be(&self) -> Cow<'_, [u8]>
fn as_bytes_be(&self) -> Cow<'_, [u8]>
Return the content as bytes in big endian encoding