Enum sierra::ImageExtent[][src]

pub enum ImageExtent {
    D1 {
        width: ImageSize,
    },
    D2 {
        width: ImageSize,
        height: ImageSize,
    },
    D3 {
        width: ImageSize,
        height: ImageSize,
        depth: ImageSize,
    },
}

Extent of the image.

Variants

D1

One dimensional extent.

Fields of D1

width: ImageSize

Width of the image

D2

Two dimensional extent.

Fields of D2

width: ImageSize

Width of the image

height: ImageSize

Height of the image.

D3

Three dimensional extent.

Fields of D3

width: ImageSize

Width of the image

height: ImageSize

Height of the image.

depth: ImageSize

Depth of the image.

Implementations

impl ImageExtent[src]

pub fn into_3d(self) -> Extent3d[src]

Convert image extent (1,2 or 3 dimensional) into 3 dimensional extent. If image doesn’t have height or depth they are set to 1.

pub fn into_2d(self) -> Extent2d[src]

Convert image extent (1,2 or 3 dimensional) into 2 dimensional extent. If image doesn’t have height it is set to 1. depth is ignored.

Trait Implementations

impl Clone for ImageExtent[src]

impl Copy for ImageExtent[src]

impl Debug for ImageExtent[src]

impl Eq for ImageExtent[src]

impl From<Extent2d> for ImageExtent[src]

impl From<Extent3d> for ImageExtent[src]

impl Hash for ImageExtent[src]

impl PartialEq<Extent2d> for ImageExtent[src]

impl PartialEq<Extent3d> for ImageExtent[src]

impl PartialEq<ImageExtent> for ImageExtent[src]

impl PartialEq<ImageExtent> for Extent2d[src]

impl PartialEq<ImageExtent> for Extent3d[src]

impl StructuralEq for ImageExtent[src]

impl StructuralPartialEq for ImageExtent[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.