pub trait RasterMut<Pixel>: Raster<Pixel> {
// Required method
fn put(into: ImageMut<'_, &mut Self>, at: Coord, val: Pixel);
// Provided method
fn shade(
image: ImageMut<'_, &mut Self>,
f: impl FnMut(u32, u32, &mut Pixel),
) { ... }
}Expand description
A raster layout where one can change pixel values independently.
In other words, requires that texels are actually one-by-one blocks of pixels.
Note that it does not prescribe any particular order of arrangement of these texels. Indeed, they could be in column major format, in row major format, ordered according to some space filling curve, etc. but subsampled images are not easily possible as pixels can not be written to independently.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".