pub enum ReadColors<'a> {
    RgbU8(Iter<'a, [u8; 3]>),
    RgbU16(Iter<'a, [u16; 3]>),
    RgbF32(Iter<'a, [f32; 3]>),
    RgbaU8(Iter<'a, [u8; 4]>),
    RgbaU16(Iter<'a, [u16; 4]>),
    RgbaF32(Iter<'a, [f32; 4]>),
}
This is supported on crate feature utils only.
Expand description

Vertex colors.

Variants

RgbU8(Iter<'a, [u8; 3]>)

RGB vertex color of type [u8; 3]>.

RgbU16(Iter<'a, [u16; 3]>)

RGB vertex color of type [u16; 3]>.

RgbF32(Iter<'a, [f32; 3]>)

RGB vertex color of type [f32; 3].

RgbaU8(Iter<'a, [u8; 4]>)

RGBA vertex color of type [u8; 4]>.

RgbaU16(Iter<'a, [u16; 4]>)

RGBA vertex color of type [u16; 4]>.

RgbaF32(Iter<'a, [f32; 4]>)

RGBA vertex color of type [f32; 4].

Implementations

Reinterpret colors as RGB u8, discarding alpha, if present. Lossy if the underlying iterator yields u16, f32 or any RGBA.

Reinterpret colors as RGB u16, discarding alpha, if present. Lossy if the underlying iterator yields f32 or any RGBA.

Reinterpret colors as RGB f32, discarding alpha, if present. Lossy if the underlying iterator yields u16 or any RGBA.

Reinterpret colors as RGBA u8, with default alpha 255. Lossy if the underlying iterator yields u16 or f32.

Reinterpret colors as RGBA u16, with default alpha 65535. Lossy if the underlying iterator yields f32.

Reinterpret colors as RGBA f32, with default alpha 1.0. Lossy if the underlying iterator yields u16.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.