#[non_exhaustive]
#[repr(u8)]
pub enum Block {
    Pixel,
    Sub1x2,
    Sub1x4,
    Sub2x2,
    Sub2x4,
    Sub4x4,
    Pack1x2,
    Pack1x4,
    Pack1x8,
    Yuv422,
    Yuy2,
    Yuv411,
}
Expand description

How many pixels are described by a single texel unit.

Also each pixel in a block to order of channels, i.e. provides the link between SampleParts and SampleBits. Note that some block layouts may have less channel than the sample if channels are not encoded separately, for example block compressed layouts.

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.

Pixel

Each texel is a single pixel.

Sub1x2

Each texel refers to two pixels across width.

Sub1x4

Each texel refers to four pixels across width.

Sub2x2

Each texel refers to a two-by-two block.

Sub2x4

Each texel refers to a two-by-four block.

Sub4x4

Each texel refers to a four-by-four block.

Pack1x2

Each texel contains channels for two pixels, consecutively.

Pack1x4

Each texel contains channels for four pixels, consecutively.

Pack1x8

Each texel contains channels for eight pixels, consecutively.

Yuv422

Yuy2

Yuv422 with different order of channels.

Yuv411

Implementations

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.