Trait FromF32Color

Source
pub trait FromF32Color:
    Sized
    + Debug
    + Copy
    + Clone {
    const ZERO: Self;

    // Required method
    fn from_f32<S: Simd>(color: f32x4<S>) -> [Self; 4];
}
Expand description

A helper trait for converting a premultiplied f32 color to Self.

Required Associated Constants§

Source

const ZERO: Self

The zero value.

Required Methods§

Source

fn from_f32<S: Simd>(color: f32x4<S>) -> [Self; 4]

Convert from a premultiplied f32 color to Self.

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 FromF32Color for f32

Source§

const ZERO: Self = 0f32

Source§

fn from_f32<S: Simd>(color: f32x4<S>) -> [Self; 4]

Source§

impl FromF32Color for u8

Source§

const ZERO: Self = 0u8

Source§

fn from_f32<S: Simd>(color: f32x4<S>) -> [Self; 4]

Implementors§