#[non_exhaustive]pub enum GeometryError {
Show 15 variants
ZeroWidth,
ZeroHeight,
ZeroRectangleWidth,
ZeroRectangleHeight,
RectangleOutOfBounds,
ZeroRows,
ZeroRowBytes,
ZeroAlignment,
StrideTooSmall,
OffsetMisaligned,
StrideMisaligned,
NoPlanes,
PlanesOutOfOrder,
PlaneOverlap,
Arithmetic(MathError),
}Expand description
A failure while validating format-neutral image geometry or storage.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ZeroWidth
An image width was zero.
ZeroHeight
An image height was zero.
ZeroRectangleWidth
A rectangle width was zero.
ZeroRectangleHeight
A rectangle height was zero.
RectangleOutOfBounds
A rectangle was not fully contained by its declared dimensions.
ZeroRows
A plane row count was zero.
ZeroRowBytes
The number of bytes used by a plane row was zero.
ZeroAlignment
A plane alignment was zero.
StrideTooSmall
A row stride was smaller than the bytes used by one row.
OffsetMisaligned
A plane offset was not divisible by its numeric alignment.
StrideMisaligned
A row stride was not divisible by its numeric alignment.
NoPlanes
A plane set was empty.
PlanesOutOfOrder
Plane offsets were not in nondecreasing order.
PlaneOverlap
Two adjacent ordered plane extents overlapped.
Arithmetic(MathError)
Checked arithmetic or platform-width conversion failed.
Trait Implementations§
Source§impl Clone for GeometryError
impl Clone for GeometryError
impl Copy for GeometryError
Source§impl Debug for GeometryError
impl Debug for GeometryError
Source§impl Display for GeometryError
impl Display for GeometryError
impl Eq for GeometryError
Source§impl Error for GeometryError
impl Error for GeometryError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<GeometryError> for PixelLayoutError
impl From<GeometryError> for PixelLayoutError
Source§fn from(error: GeometryError) -> Self
fn from(error: GeometryError) -> Self
Converts to this type from the input type.
Source§impl Hash for GeometryError
impl Hash for GeometryError
Source§impl PartialEq for GeometryError
impl PartialEq for GeometryError
impl StructuralPartialEq for GeometryError
Auto Trait Implementations§
impl Freeze for GeometryError
impl RefUnwindSafe for GeometryError
impl Send for GeometryError
impl Sync for GeometryError
impl Unpin for GeometryError
impl UnsafeUnpin for GeometryError
impl UnwindSafe for GeometryError
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
Mutably borrows from an owned value. Read more