exr::image::write::channels

Trait RecursivePixelWriter

Source
pub trait RecursivePixelWriter<Pixel>: Sync {
    // Required method
    fn write_pixels<FullPixel>(
        &self,
        bytes: &mut [u8],
        pixels: &[FullPixel],
        get_pixel: impl Fn(&FullPixel) -> &Pixel,
    );
}
Expand description

Write pixels to a slice of bytes. The top level writer contains all the other channels, the most inner channel is NoneMore.

Required Methods§

Source

fn write_pixels<FullPixel>( &self, bytes: &mut [u8], pixels: &[FullPixel], get_pixel: impl Fn(&FullPixel) -> &Pixel, )

Write pixels to a slice of bytes. Recursively do this for all channels.

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§

Source§

impl RecursivePixelWriter<NoneMore> for NoneMore

Source§

impl<Inner, InnerPixel, Sample> RecursivePixelWriter<Recursive<InnerPixel, Sample>> for Recursive<Inner, Option<SampleWriter<Sample>>>
where Inner: RecursivePixelWriter<InnerPixel>, Sample: IntoNativeSample,

Source§

impl<Inner, InnerPixel, Sample: IntoNativeSample> RecursivePixelWriter<Recursive<InnerPixel, Sample>> for Recursive<Inner, SampleWriter<Sample>>
where Inner: RecursivePixelWriter<InnerPixel>,