Trait cosmic::cosmic_theme::palette::num::FromScalar

source ·
pub trait FromScalar {
    type Scalar;

    // Required method
    fn from_scalar(scalar: Self::Scalar) -> Self;
}
Expand description

Trait for creating a vectorized value from a scalar value.

Required Associated Types§

source

type Scalar

The scalar type that is stored in each lane of Self. Scalar types should set this to equal Self.

Required Methods§

source

fn from_scalar(scalar: Self::Scalar) -> Self

Create a new vectorized value where each lane is scalar. This corresponds to splat for SIMD types.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromScalar for f32

source§

impl FromScalar for f64

source§

impl FromScalar for u8

source§

impl FromScalar for u16

source§

impl FromScalar for u32

source§

impl FromScalar for u64

source§

impl FromScalar for u128

Implementors§