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§
Sourcetype RecursiveChannelDescriptions
type RecursiveChannelDescriptions
The channel descriptions from the image.
Will be converted to a tuple before being stored in SpecificChannels<_, ChannelDescriptions>
.
Sourcetype RecursivePixel: Copy + Default + 'static
type RecursivePixel: Copy + Default + 'static
The pixel type. Will be converted to a tuple at the end of the process.
Required Methods§
Sourcefn get_descriptions(&self) -> Self::RecursiveChannelDescriptions
fn get_descriptions(&self) -> Self::RecursiveChannelDescriptions
Returns the channel descriptions based on the channels in the file.
Sourcefn read_pixels<'s, FullPixel>(
&self,
bytes: &'s [u8],
pixels: &mut [FullPixel],
get_pixel: impl Fn(&mut FullPixel) -> &mut Self::RecursivePixel,
)
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.