Trait palette::num::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.

Object Safety§

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§