#[non_exhaustive]pub enum PixmapError {
Overflow {
width: u32,
height: u32,
},
TooLarge {
width: u32,
height: u32,
pixels: usize,
max: usize,
},
}Expand description
Why Pixmap::try_new refused to allocate.
Both variants describe the requested size, so a caller can report it or map it into its own limit error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Overflow
width * height does not fit in usize on this target.
TooLarge
width * height exceeds Pixmap::MAX_PIXELS.
Trait Implementations§
Source§impl Clone for PixmapError
impl Clone for PixmapError
Source§fn clone(&self) -> PixmapError
fn clone(&self) -> PixmapError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PixmapError
Source§impl Debug for PixmapError
impl Debug for PixmapError
Source§impl Display for PixmapError
impl Display for PixmapError
impl Eq for PixmapError
Source§impl Error for PixmapError
impl Error for PixmapError
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<PixmapError> for Iw44Error
The decoder’s output pixmap is bounded like its input planes.
impl From<PixmapError> for Iw44Error
The decoder’s output pixmap is bounded like its input planes.
Pixmap::try_new refuses more than Pixmap::MAX_PIXELS; the decoder
already rejects an image that large at the header, so this is the same
limit reported from the other end.
Source§fn from(_: PixmapError) -> Iw44Error
fn from(_: PixmapError) -> Iw44Error
Source§impl From<PixmapError> for RenderError
A refused output pixmap is a render-output limit.
impl From<PixmapError> for RenderError
A refused output pixmap is a render-output limit.
Pixmap::try_new caps one pixmap at Pixmap::MAX_PIXELS; on the render
paths that ceiling belongs to the same axis as the configurable
max_render_pixels, so it surfaces as RenderError::ResourceLimit. A
usize overflow of width * height is an invalid size, not a limit.
Source§fn from(e: PixmapError) -> Self
fn from(e: PixmapError) -> Self
Source§impl Hash for PixmapError
impl Hash for PixmapError
Source§impl PartialEq for PixmapError
impl PartialEq for PixmapError
impl StructuralPartialEq for PixmapError
Auto Trait Implementations§
impl Freeze for PixmapError
impl RefUnwindSafe for PixmapError
impl Send for PixmapError
impl Sync for PixmapError
impl Unpin for PixmapError
impl UnsafeUnpin for PixmapError
impl UnwindSafe for PixmapError
Blanket Implementations§
impl<T> Any for Twhere
T: Any,
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
impl<T> CloneAny for T
impl<T> CloneAny for T
impl<T> CloneAnySend for T
impl<T> CloneAnySendSync for T
impl<T> CloneAnySync for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<E> ErrorClone for E
impl<E> ErrorClone for E
Source§fn clone_box(&self) -> Box<dyn ErrorClone>
fn clone_box(&self) -> Box<dyn ErrorClone>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more