pub trait Mixer<T: Sized + Default + Copy> {
type IntermediateH: Sized + Default + Copy + BorrowMut<[T]> + Borrow<[T]>;
type IntermediateV: Sized + Default + Copy + BorrowMut<[T]> + Borrow<[T]>;
// Required method
fn mix_pixels(
vxp: &Self::IntermediateH,
vyp: &Self::IntermediateV,
next_pixel: &mut dyn FnMut(PixelRgb),
);
// Provided methods
fn intermediate_h_len() -> usize { ... }
fn intermediate_v_len() -> usize { ... }
}
Expand description
Implementations of this trait should compute the color of each pixel based on an intermediate data created by a IntermediateCalculator.
The type T
should be a f32
or a packed simd f32x8
if a “use-simd” crate feature is
enabled.
Required Associated Types§
Required Methods§
sourcefn mix_pixels(
vxp: &Self::IntermediateH,
vyp: &Self::IntermediateV,
next_pixel: &mut dyn FnMut(PixelRgb),
)
fn mix_pixels( vxp: &Self::IntermediateH, vyp: &Self::IntermediateV, next_pixel: &mut dyn FnMut(PixelRgb), )
The implementors should compute a pixel and send it as an instance of PixelRgb to the
provided next_pixel
function.
The computation should be based on the provided combination of intermediate data.
Provided Methods§
sourcefn intermediate_h_len() -> usize
fn intermediate_h_len() -> usize
Returns the number of intermediate horizontal values.
sourcefn intermediate_v_len() -> usize
fn intermediate_v_len() -> usize
Returns the number of intermediate vertical values.
Object Safety§
This trait is not object safe.