Enum luminance::texture::TextureError [−][src]
#[non_exhaustive]
pub enum TextureError {
TextureStorageCreationFailed(String),
NotEnoughPixels {
expected_bytes: usize,
provided_bytes: usize,
},
UnsupportedPixelFormat(PixelFormat),
CannotRetrieveTexels(String),
CannotUploadTexels(String),
}
Expand description
Errors that might happen when working with textures.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
TextureStorageCreationFailed(String)
Tuple Fields
0: String
A texture’s storage failed to be created.
The carried String
gives the reason of the failure.
NotEnoughPixels
Fields
expected_bytes: usize
Expected number of pixels in bytes.
provided_bytes: usize
Provided number of pixels in bytes.
Not enough pixel data provided for the given area asked.
You must provide at least as many pixels as expected by the area in the texture you’re uploading to.
UnsupportedPixelFormat(PixelFormat)
Tuple Fields
0: 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.
CannotRetrieveTexels(String)
Tuple Fields
0: String
Cannot retrieve texels from a texture.
That error might happen on some hardware implementations if the user tries to retrieve texels from a texture that doesn’t support getting its texels retrieved.
CannotUploadTexels(String)
Tuple Fields
0: String
Failed to upload texels.
Implementations
A texture’s storage failed to be created.
Not enough pixel data provided for the given area asked.
Unsupported pixel format.
Cannot retrieve texels from a texture.
Failed to upload texels.
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for TextureError
impl Send for TextureError
impl Sync for TextureError
impl Unpin for TextureError
impl UnwindSafe for TextureError
Blanket Implementations
Mutably borrows from an owned value. Read more