Skip to main content

StridedLayout

Trait StridedLayout 

Source
pub trait StridedLayout: Layout {
    // Required method
    fn strided(&self) -> StridedBytes;
}
Expand description

A layout that is a strided matrix of elements.

Like all layout traits, implementations should ensure that the layout returned in these methods occupied a subset of pixels of their original layout.

Required Methods§

Source

fn strided(&self) -> StridedBytes

The valid strided specification of this layout.

This call should not fail, or panic. Otherwise, prefer an optional getter for the StridedBytes and have the caller decay their own buffer.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: StridedLayout> StridedLayout for &T

Source§

impl<T: StridedLayout> StridedLayout for &mut T

Implementors§