Struct image_texel::layout::Strides
source · [−]pub struct Strides<T> { /* private fields */ }
Expand description
A validated layout of a rectangular matrix of texels.
Similar to StridedBytes
but with a strong type associated to the texel, instead of a mere
layout descriptor for it. This type is still flexible, i.e. you can relax the layout to a pure
byte layout and upgrade to a different texel, for example.
Implementations
sourceimpl<T> Strides<T>
impl<T> Strides<T>
sourcepub fn with_texel(texel: Texel<T>, bytes: StridedBytes) -> Option<Self>
pub fn with_texel(texel: Texel<T>, bytes: StridedBytes) -> Option<Self>
Upgrade a byte specification to a strong typed texel one.
Requires that the element is exactly equivalent to the provided texel.
pub fn spec(&self) -> StrideSpec
pub fn texel(&self) -> Texel<T>
Trait Implementations
sourceimpl<P> StridedLayout for Strides<P>
impl<P> StridedLayout for Strides<P>
sourcefn strided(&self) -> StridedBytes
fn strided(&self) -> StridedBytes
The valid strided specification of this layout. Read more
impl<T: Copy> Copy for Strides<T>
impl<T: Eq> Eq for Strides<T>
impl<T> StructuralEq for Strides<T>
impl<T> StructuralPartialEq for Strides<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Strides<T> where
T: RefUnwindSafe,
impl<T> Send for Strides<T> where
T: Send,
impl<T> Sync for Strides<T> where
T: Sync,
impl<T> Unpin for Strides<T> where
T: Unpin,
impl<T> UnwindSafe for Strides<T> where
T: UnwindSafe,
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