pub enum Error {
EmptySurface,
UnsupportedFormat {
bits_per_pixel: u8,
},
InvalidFormat,
PitchTooSmall {
pitch: usize,
required: usize,
},
BufferTooSmall {
len: usize,
required: usize,
},
Unaligned,
FormatMismatch {
dst: Format,
src: Format,
},
Overflow,
}Expand description
Why a canvas could not be created or a copy refused to run.
Variants§
EmptySurface
Zero width or height.
UnsupportedFormat
A layout the drawing backends do not implement (anything but 24/32 bpp).
InvalidFormat
Masks, shifts and width do not form a usable layout.
PitchTooSmall
pitch < width * bytes_per_pixel.
BufferTooSmall
The backing store is shorter than pitch * height.
Unaligned
32 bpp requires a 4-byte aligned pitch and base pointer.
FormatMismatch
A bulk copy was attempted between two different native layouts.
Overflow
Arithmetic overflow while validating the geometry.
Trait Implementations§
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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