Trait embedded_graphics::pixelcolor::raw::ToBytes
source · pub trait ToBytes {
type Bytes;
// Required methods
fn to_be_bytes(self) -> Self::Bytes;
fn to_le_bytes(self) -> Self::Bytes;
fn to_ne_bytes(self) -> Self::Bytes;
}
Expand description
Trait to convert colors into a byte array.
See the module-level documentation for an example.
Required Associated Types§
Required Methods§
sourcefn to_be_bytes(self) -> Self::Bytes
fn to_be_bytes(self) -> Self::Bytes
Converts a color into a byte array with big endian byte order.
sourcefn to_le_bytes(self) -> Self::Bytes
fn to_le_bytes(self) -> Self::Bytes
Converts a color into a byte array with little endian byte order.
sourcefn to_ne_bytes(self) -> Self::Bytes
fn to_ne_bytes(self) -> Self::Bytes
Converts a color into a byte array with native byte order.