Trait gltf::mesh::util::colors::Cast

source ·
pub trait Cast {
    type Output;

    // Required methods
    fn cast_rgb_u8(x: [u8; 3]) -> Self::Output;
    fn cast_rgb_u16(x: [u16; 3]) -> Self::Output;
    fn cast_rgb_f32(x: [f32; 3]) -> Self::Output;
    fn cast_rgba_u8(x: [u8; 4]) -> Self::Output;
    fn cast_rgba_u16(x: [u16; 4]) -> Self::Output;
    fn cast_rgba_f32(x: [f32; 4]) -> Self::Output;
}
Available on crate feature utils only.
Expand description

Trait for types which describe casting behaviour.

Required Associated Types§

source

type Output

Output type.

Required Methods§

source

fn cast_rgb_u8(x: [u8; 3]) -> Self::Output

Cast from RGB u8.

source

fn cast_rgb_u16(x: [u16; 3]) -> Self::Output

Cast from RGB u16.

source

fn cast_rgb_f32(x: [f32; 3]) -> Self::Output

Cast from RGB f32.

source

fn cast_rgba_u8(x: [u8; 4]) -> Self::Output

Cast from RGBA u8.

source

fn cast_rgba_u16(x: [u16; 4]) -> Self::Output

Cast from RGBA u16.

source

fn cast_rgba_f32(x: [f32; 4]) -> Self::Output

Cast from RGBA f32.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Cast for RgbF32

§

type Output = [f32; 3]

source§

impl Cast for RgbU8

§

type Output = [u8; 3]

source§

impl Cast for RgbU16

§

type Output = [u16; 3]

source§

impl Cast for RgbaF32

§

type Output = [f32; 4]

source§

impl Cast for RgbaU8

§

type Output = [u8; 4]

source§

impl Cast for RgbaU16

§

type Output = [u16; 4]