#[non_exhaustive]
#[repr(u8)]
pub enum SampleBits {
Show 38 variants Int8, UInt8, UInt1x8, UInt2x4, UInt332, UInt233, Int16, UInt16, UInt4x2, UInt4x4, UInt4x6, UInt_444, UInt444_, UInt565, UInt8x2, UInt8x3, UInt8x4, UInt8x6, Int8x2, Int8x3, Int8x4, UInt16x2, UInt16x3, UInt16x4, Int16x2, Int16x3, Int16x4, UInt16x6, UInt1010102, UInt2101010, UInt101010_, UInt_101010, Float16x4, Float32, Float32x2, Float32x3, Float32x4, Float32x6,
}
Expand description

The bit-placement of samples within a texel.

We start with low-order bits in a little-endian representation of the surrounding numbers. So, for example, Int332 has the first sample in the three lowest bits of a u8 (byte-order independent) and a Int565 has its first channel in the first 5 low-order bits of a u16 little endian interpretation of the bytes.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

Int8

A single 8-bit signed integer.

UInt8

A single 8-bit integer.

UInt1x8

Eight 1-bit integer.

UInt2x4

Four 2-bit integer.

UInt332

Three packed integer.

UInt233

Three packed integer.

Int16

A single 8-bit signed integer.

UInt16

A single 16-bit integer.

UInt4x2

Two packed integer.

UInt4x4

Four packed integer.

UInt4x6

Six packed integer.

UInt_444

Four packed integer, one component ignored.

UInt444_

Four packed integer, one component ignored.

UInt565

Three packed integer.

UInt8x2

Two 8-bit integers.

UInt8x3

Three 8-bit integer.

UInt8x4

Four 8-bit integer.

UInt8x6

Six 8-bit integer.

Int8x2

Two 8-bit integers.

Int8x3

Three 8-bit integer.

Int8x4

Four 8-bit integer.

UInt16x2

Two 16-bit integers.

UInt16x3

Three 16-bit integer.

UInt16x4

Four 16-bit integer.

Int16x2

Two 16-bit signed integers.

Int16x3

Three 16-bit integer.

Int16x4

Four 16-bit integer.

UInt16x6

Six 16-bit integer.

UInt1010102

Four packed integer.

UInt2101010

Four packed integer.

UInt101010_

Three packed integer, one component ignored.

UInt_101010

Three packed integer, one component ignored.

Float16x4

Four half-floats.

Float32

A single floating-point channel.

Float32x2

Two float channels.

Float32x3

Three float channels.

Float32x4

Four floats.

Float32x6

Six floats.

Implementations

Determine the number of bytes for texels containing these samples.

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

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

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.