Enum image::flat::NormalForm
source · [−]pub enum NormalForm {
Unaliased,
PixelPacked,
ImagePacked,
RowMajorPacked,
ColumnMajorPacked,
}
Expand description
Different normal forms of buffers.
A normal form is an unaliased buffer with some additional constraints. The ÌmageBuffer
uses
row major form with packed samples.
Variants
Unaliased
No pixel aliases another.
Unaliased also guarantees that all index calculations in the image bounds using
dim_index*dim_stride
(such as x*width_stride + y*height_stride
) do not overflow.
PixelPacked
At least pixels are packed.
Images of these types can wrap [T]
-slices into the standard color types. This is a
precondition for GenericImage
which requires by-reference access to pixels.
ImagePacked
All samples are packed.
This is orthogonal to PixelPacked
. It requires that there are no holes in the image but
it is not necessary that the pixel samples themselves are adjacent. An example of this
behaviour is a planar image layout.
RowMajorPacked
The samples are in row-major form and all samples are packed.
In addition to PixelPacked
and ImagePacked
this also asserts that the pixel matrix is
in row-major form.
ColumnMajorPacked
The samples are in column-major form and all samples are packed.
In addition to PixelPacked
and ImagePacked
this also asserts that the pixel matrix is
in column-major form.
Trait Implementations
sourceimpl Clone for NormalForm
impl Clone for NormalForm
sourcefn clone(&self) -> NormalForm
fn clone(&self) -> NormalForm
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 Debug for NormalForm
impl Debug for NormalForm
sourceimpl Hash for NormalForm
impl Hash for NormalForm
sourceimpl PartialEq<NormalForm> for NormalForm
impl PartialEq<NormalForm> for NormalForm
sourceimpl PartialOrd<NormalForm> for NormalForm
impl PartialOrd<NormalForm> for NormalForm
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
Compares the logical preconditions.
a < b
if the normal form a
has less preconditions than b
.
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for NormalForm
impl Eq for NormalForm
impl StructuralEq for NormalForm
impl StructuralPartialEq for NormalForm
Auto Trait Implementations
impl RefUnwindSafe for NormalForm
impl Send for NormalForm
impl Sync for NormalForm
impl Unpin for NormalForm
impl UnwindSafe for NormalForm
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Pointable for T
impl<T> Pointable for T
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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more