Trait rgb::ComponentBytes[][src]

pub trait ComponentBytes<T: Copy + Send + Sync + 'static> where
    Self: ComponentSlice<T>, 
{ fn as_bytes(&self) -> &[u8] { ... }
fn as_bytes_mut(&mut self) -> &mut [u8] { ... } }

Casting a slice of RGB/A values to a slice of u8

Provided methods

fn as_bytes(&self) -> &[u8][src]

The components interpreted as raw bytes, in machine’s native endian. In RGB bytes of the red component are first.

fn as_bytes_mut(&mut self) -> &mut [u8][src]

The components interpreted as raw bytes, in machine’s native endian. In RGB bytes of the red component are first.

Loading content...

Implementors

impl<T: Copy + Send + Sync + 'static> ComponentBytes<T> for [BGR<T>][src]

impl<T: Copy + Send + Sync + 'static> ComponentBytes<T> for [BGRA<T>][src]

impl<T: Copy + Send + Sync + 'static> ComponentBytes<T> for [Gray<T>][src]

impl<T: Copy + Send + Sync + 'static> ComponentBytes<T> for [GrayAlpha<T>][src]

impl<T: Copy + Send + Sync + 'static> ComponentBytes<T> for [RGB<T>][src]

impl<T: Copy + Send + Sync + 'static> ComponentBytes<T> for [RGBA<T>][src]

Loading content...