Skip to main content

TextureFormatPixelInfo

Trait TextureFormatPixelInfo 

Source
pub trait TextureFormatPixelInfo {
    // Required method
    fn pixel_size(&self) -> Result<usize, TextureAccessError>;
}
Expand description

Extends the wgpu TextureFormat with information about the pixel.

Required Methods§

Source

fn pixel_size(&self) -> Result<usize, TextureAccessError>

Returns the size of a pixel in bytes of the format. error with TextureAccessError::UnsupportedTextureFormat if the format is compressed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl TextureFormatPixelInfo for TextureFormat

Implementors§