Skip to main content

PixelComponent

Trait PixelComponent 

Source
pub trait PixelComponent:
    Copy
    + Send
    + Sync
    + 'static {
    // Required methods
    fn to_f64(self) -> f64;
    fn from_f64(value: f64) -> Self;
}
Expand description

Scalar component supported by generic CPU image kernels.

Required Methods§

Source

fn to_f64(self) -> f64

Converts a scalar into the kernel accumulator representation.

Source

fn from_f64(value: f64) -> Self

Converts a finite accumulator value back into the scalar dtype.

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.

Implementations on Foreign Types§

Source§

impl PixelComponent for f32

Source§

fn to_f64(self) -> f64

Source§

fn from_f64(value: f64) -> Self

Source§

impl PixelComponent for f64

Source§

fn to_f64(self) -> f64

Source§

fn from_f64(value: f64) -> Self

Source§

impl PixelComponent for u8

Source§

fn to_f64(self) -> f64

Source§

fn from_f64(value: f64) -> Self

Source§

impl PixelComponent for u16

Source§

fn to_f64(self) -> f64

Source§

fn from_f64(value: f64) -> Self

Implementors§