palette::num

Trait FromScalarArray

Source
pub trait FromScalarArray<const N: usize>: FromScalar {
    // Required method
    fn from_array(scalars: [Self::Scalar; N]) -> Self;
}
Expand description

Conversion from an array of scalars to a vectorized value.

Required Methods§

Source

fn from_array(scalars: [Self::Scalar; N]) -> Self

Creates a vectorized value from an array of scalars.

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 FromScalarArray<1> for f32

Source§

fn from_array(scalars: [Self; 1]) -> Self

Source§

impl FromScalarArray<1> for f64

Source§

fn from_array(scalars: [Self; 1]) -> Self

Source§

impl FromScalarArray<1> for u8

Source§

fn from_array(scalars: [Self; 1]) -> Self

Source§

impl FromScalarArray<1> for u16

Source§

fn from_array(scalars: [Self; 1]) -> Self

Source§

impl FromScalarArray<1> for u32

Source§

fn from_array(scalars: [Self; 1]) -> Self

Source§

impl FromScalarArray<1> for u64

Source§

fn from_array(scalars: [Self; 1]) -> Self

Source§

impl FromScalarArray<1> for u128

Source§

fn from_array(scalars: [Self; 1]) -> Self

Implementors§