Struct image_texel::layout::StrideSpec
source · [−]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
sourceimpl Clone for StrideSpec
impl Clone for StrideSpec
sourcefn clone(&self) -> StrideSpec
fn clone(&self) -> StrideSpec
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl From<&'_ StridedBytes> for StrideSpec
impl From<&'_ StridedBytes> for StrideSpec
sourcefn from(layout: &StridedBytes) -> Self
fn from(layout: &StridedBytes) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<StrideSpec> for StrideSpec
impl PartialEq<StrideSpec> for StrideSpec
sourcefn eq(&self, other: &StrideSpec) -> bool
fn eq(&self, other: &StrideSpec) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &StrideSpec) -> bool
fn ne(&self, other: &StrideSpec) -> bool
This method tests for !=.
impl Copy for StrideSpec
impl Eq for StrideSpec
impl StructuralEq for StrideSpec
impl StructuralPartialEq for StrideSpec
Auto Trait Implementations
impl RefUnwindSafe for StrideSpec
impl Send for StrideSpec
impl Sync for StrideSpec
impl Unpin for StrideSpec
impl UnwindSafe for StrideSpec
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more