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§
Source§impl Clone for NormalForm
impl Clone for NormalForm
Source§fn clone(&self) -> NormalForm
fn clone(&self) -> NormalForm
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NormalForm
Source§impl Debug for NormalForm
impl Debug for NormalForm
impl Eq for NormalForm
Source§impl Hash for NormalForm
impl Hash for NormalForm
Source§impl PartialEq for NormalForm
impl PartialEq for NormalForm
Source§fn eq(&self, other: &NormalForm) -> bool
fn eq(&self, other: &NormalForm) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for NormalForm
impl PartialOrd for NormalForm
Source§fn partial_cmp(&self, other: &NormalForm) -> Option<Ordering>
fn partial_cmp(&self, other: &NormalForm) -> Option<Ordering>
Compares the logical preconditions.
a < b if the normal form a has less preconditions than b.
impl StructuralPartialEq for NormalForm
Auto Trait Implementations§
impl Freeze for NormalForm
impl RefUnwindSafe for NormalForm
impl Send for NormalForm
impl Sync for NormalForm
impl Unpin for NormalForm
impl UnsafeUnpin for NormalForm
impl UnwindSafe for NormalForm
Blanket Implementations§
impl<T> Any for Twhere
T: Any,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Component for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more