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: usizeThe number of pixels in width direction.
height: usizeThe number of pixels in height direction.
element: TexelLayoutThe 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: usizeThe number of bytes to go one pixel along the width.
height_stride: usizeThe number of bytes to go one pixel along the height.
offset: usizeOffset of this matrix from the start.
Trait Implementations§
Source§impl Clone for StrideSpec
impl Clone for StrideSpec
Source§fn clone(&self) -> StrideSpec
fn clone(&self) -> StrideSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StrideSpec
impl Eq for StrideSpec
Source§impl From<&StridedBytes> for StrideSpec
impl From<&StridedBytes> for StrideSpec
Source§fn from(layout: &StridedBytes) -> Self
fn from(layout: &StridedBytes) -> Self
Converts to this type from the input type.
Source§impl PartialEq for StrideSpec
impl PartialEq for StrideSpec
Source§fn eq(&self, other: &StrideSpec) -> bool
fn eq(&self, other: &StrideSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StrideSpec
Auto Trait Implementations§
impl Freeze for StrideSpec
impl RefUnwindSafe for StrideSpec
impl Send for StrideSpec
impl Sync for StrideSpec
impl Unpin for StrideSpec
impl UnsafeUnpin for StrideSpec
impl UnwindSafe for StrideSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more