pub struct StrideSpec {
    pub width: usize,
    pub height: usize,
    pub element: TexelLayout,
    pub width_stride: usize,
    pub height_stride: usize,
    pub offset: usize,
}
Expand description

A simple layout describing some pixels as a byte matrix.

Fields

width: usize

The number of pixels in width direction.

height: usize

The number of pixels in height direction.

element: TexelLayout

The number of bytes of a single pixel.

If this differs from both width_stride and height_stride the any copy must loop over individual pixels. Otherwise, whole rows or columns of contiguous data may be inspected.

width_stride: usize

The number of bytes to go one pixel along the width.

height_stride: usize

The number of bytes to go one pixel along the height.

offset: usize

Offset of this matrix from the start.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Converts to this type from the input type.

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

🔬 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.