[−][src]Enum luminance::texture::TextureError
Errors that might happen when working with textures.
Variants (Non-exhaustive)
TextureStorageCreationFailed(String)
A texture’s storage failed to be created.
The carried String
gives the reason of the failure.
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.
Fields of NotEnoughPixels
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.
CannotRetrieveTexels(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)
Failed to upload texels.
Implementations
impl TextureError
[src]
pub fn texture_storage_creation_failed(reason: impl Into<String>) -> Self
[src]
A texture’s storage failed to be created.
pub fn not_enough_pixels(expected_bytes: usize, provided_bytes: usize) -> Self
[src]
Not enough pixel data provided for the given area asked.
pub fn unsupported_pixel_format(pf: PixelFormat) -> Self
[src]
Unsupported pixel format.
pub fn cannot_retrieve_texels(reason: impl Into<String>) -> Self
[src]
Cannot retrieve texels from a texture.
pub fn cannot_upload_texels(reason: impl Into<String>) -> Self
[src]
Failed to upload texels.
Trait Implementations
impl Clone for TextureError
[src]
pub fn clone(&self) -> TextureError
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TextureError
[src]
impl Display for TextureError
[src]
impl Eq for TextureError
[src]
impl Error for TextureError
[src]
pub fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
pub fn description(&self) -> &str
1.0.0[src]
pub fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl From<TextureError> for FramebufferError
[src]
pub fn from(e: TextureError) -> Self
[src]
impl PartialEq<TextureError> for TextureError
[src]
pub fn eq(&self, other: &TextureError) -> bool
[src]
pub fn ne(&self, other: &TextureError) -> bool
[src]
impl StructuralEq for TextureError
[src]
impl StructuralPartialEq for TextureError
[src]
Auto Trait Implementations
impl RefUnwindSafe for TextureError
[src]
impl Send for TextureError
[src]
impl Sync for TextureError
[src]
impl Unpin for TextureError
[src]
impl UnwindSafe for TextureError
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,