[][src]Enum image::flat::NormalForm

pub enum NormalForm {
    Unaliased,
    PixelPacked,
    ImagePacked,
    RowMajorPacked,
    ColumnMajorPacked,
}

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

impl Eq for NormalForm[src]

impl Copy for NormalForm[src]

impl PartialOrd<NormalForm> for NormalForm[src]

fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]

Compares the logical preconditions.

a < b if the normal form a has less preconditions than b.

#[must_use]
default fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
default fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
default fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
default fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq<NormalForm> for NormalForm[src]

#[must_use]
default fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for NormalForm[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for NormalForm[src]

impl Hash for NormalForm[src]

default fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for NormalForm

impl Sync for NormalForm

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T[src]

default fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 
[src]

Sets value as a parameter of self.