Trait rgb::ComponentBytes [] [src]

pub trait ComponentBytes<T> {
    fn as_slice(&self) -> &[T];
fn as_mut_slice(&mut self) -> &mut [T]; fn as_bytes(&self) -> &[u8] { ... } }

Casting the struct to slices/bytes of its components

Required Methods

The components interpreted as an array, e.g. RGB gives 3-element slice. The red component is first.

Provided Methods

The components interpreted as raw bytes, in machine's native endian. Bytes of the red component are first.

Implementors