exr::image::read::specific_channels

Trait RecursivePixelReader

Source
pub trait RecursivePixelReader {
    type RecursiveChannelDescriptions;
    type RecursivePixel: Copy + Default + 'static;

    // Required methods
    fn get_descriptions(&self) -> Self::RecursiveChannelDescriptions;
    fn read_pixels<'s, FullPixel>(
        &self,
        bytes: &'s [u8],
        pixels: &mut [FullPixel],
        get_pixel: impl Fn(&mut FullPixel) -> &mut Self::RecursivePixel,
    );
}
Expand description

A reader containing sub-readers for reading the pixel content of an image.

Required Associated Types§

Source

type RecursiveChannelDescriptions

The channel descriptions from the image. Will be converted to a tuple before being stored in SpecificChannels<_, ChannelDescriptions>.

Source

type RecursivePixel: Copy + Default + 'static

The pixel type. Will be converted to a tuple at the end of the process.

Required Methods§

Source

fn get_descriptions(&self) -> Self::RecursiveChannelDescriptions

Returns the channel descriptions based on the channels in the file.

Source

fn read_pixels<'s, FullPixel>( &self, bytes: &'s [u8], pixels: &mut [FullPixel], get_pixel: impl Fn(&mut FullPixel) -> &mut Self::RecursivePixel, )

Read the line of pixels.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§