Trait vulkano::format::Pixel[][src]

pub unsafe trait Pixel {
    fn ensure_accepts(format: Format) -> Result<(), IncompatiblePixelsType>;
fn rate(format: Format) -> u32; }
Expand description

Trait for Rust types that can represent a pixel in an image.

Required methods

Returns an error if Self cannot be used as a source of pixels for format.

The number of Selfs which make up a single pixel.

Panics

May panic if ensure_accepts would not return Ok(()).

Implementations on Foreign Types

Implementors