[][src]Enum luminance::texture::TextureError

pub enum TextureError {
    TextureStorageCreationFailed(String),
    NotEnoughPixels(usizeusize),
    UnsupportedPixelFormat(PixelFormat),
}

Errors that might happen when working with textures.

Variants

TextureStorageCreationFailed(String)

A texture’s storage failed to be created.

The carried String gives the reason of the failure.

NotEnoughPixels(usizeusize)

Not enough pixel data provided for the given area asked.

The first usize is the number of expected bytes to be uploaded and the second usize is the number you provided. You must provide at least as many pixels as expected by the area in the texture you’re uploading to.

UnsupportedPixelFormat(PixelFormat)

Unsupported pixel format.

Sometimes, some hardware might not support a given pixel format (or the format exists on the interface side but doesn’t in the implementation). That error represents such a case.

Trait Implementations

impl Eq for TextureError[src]

impl Clone for TextureError[src]

impl PartialEq<TextureError> for TextureError[src]

impl Debug for TextureError[src]

impl Display for TextureError[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

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.

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

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

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