pub enum ImageError {
ZeroDimension,
InvalidBudget,
DimensionsTooLarge,
InvalidPixelCount,
BudgetExceeded {
limit: usize,
actual: usize,
},
AllocationFailed {
requested_bytes: usize,
},
RendererMismatch,
RecoverySourceMismatch,
UpdateRegionOutOfBounds,
InvalidSprite,
InvalidPlacement,
BatchBudgetExceeded {
limit: usize,
actual: usize,
},
}Expand description
Failure while creating, restoring, or updating an RGBA image.
Variants§
ZeroDimension
A width or height was zero.
InvalidBudget
A resource budget cannot fit its minimum image or batch element.
DimensionsTooLarge
Dimensions or their RGBA byte arithmetic exceed a configured/device limit.
InvalidPixelCount
Pixel data does not contain exactly width × height × four bytes.
BudgetExceeded
The image exceeds its host-selected byte limit.
AllocationFailed
CPU recovery, conversion, or batch-staging storage could not be reserved.
RendererMismatch
A retained image belongs to another renderer generation.
RecoverySourceMismatch
A recovery operation was given a different logical image than the source used.
UpdateRegionOutOfBounds
A partial update does not fit in the image.
InvalidSprite
A sprite source rectangle or tint is invalid for its image.
InvalidPlacement
Draw translation is outside the portable envelope or tint is not normalized.
BatchBudgetExceeded
A sprite batch exceeds its retained count or CPU metadata byte limit.
Trait Implementations§
Source§impl Clone for ImageError
impl Clone for ImageError
impl Copy for ImageError
Source§impl Debug for ImageError
impl Debug for ImageError
Source§impl Display for ImageError
impl Display for ImageError
impl Eq for ImageError
Source§impl Error for ImageError
impl Error for ImageError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ImageError> for GlyphError
impl From<ImageError> for GlyphError
Source§fn from(error: ImageError) -> Self
fn from(error: ImageError) -> Self
Source§impl From<ImageError> for TextError
impl From<ImageError> for TextError
Source§fn from(error: ImageError) -> Self
fn from(error: ImageError) -> Self
Source§impl PartialEq for ImageError
impl PartialEq for ImageError
impl StructuralPartialEq for ImageError
Auto Trait Implementations§
impl Freeze for ImageError
impl RefUnwindSafe for ImageError
impl Send for ImageError
impl Sync for ImageError
impl Unpin for ImageError
impl UnsafeUnpin for ImageError
impl UnwindSafe for ImageError
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.