palette::num

Trait IntoScalarArray

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

Conversion from a vectorized value to an array of scalars.

Required Methods§

Source

fn into_array(self) -> [Self::Scalar; N]

Creates an array of scalars from a vectorized value.

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

Source§

fn into_array(self) -> [Self; 1]

Source§

impl IntoScalarArray<1> for f64

Source§

fn into_array(self) -> [Self; 1]

Source§

impl IntoScalarArray<1> for u8

Source§

fn into_array(self) -> [Self; 1]

Source§

impl IntoScalarArray<1> for u16

Source§

fn into_array(self) -> [Self; 1]

Source§

impl IntoScalarArray<1> for u32

Source§

fn into_array(self) -> [Self; 1]

Source§

impl IntoScalarArray<1> for u64

Source§

fn into_array(self) -> [Self; 1]

Source§

impl IntoScalarArray<1> for u128

Source§

fn into_array(self) -> [Self; 1]

Implementors§