#[non_exhaustive]pub enum PaintError {
WouldBlock,
Allocate(DumbError),
UnknownFormat(u32),
Zero(&'static str),
}Expand description
What went wrong painting a frame.
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.
WouldBlock
Every slot is busy. Retry after the next flip completes.
Flow control, not a failure: the producer is ahead of the display.
Allocate(DumbError)
A slot’s buffer could not be allocated.
UnknownFormat(u32)
The format’s bits-per-pixel is not one this can size an allocation from.
Zero(&'static str)
A zero width, height or slot count, which the reference refuses as
EINVAL: a ring of nothing could never paint a frame.
Trait Implementations§
Source§impl Debug for PaintError
impl Debug for PaintError
Source§impl Display for PaintError
impl Display for PaintError
Source§impl Error for PaintError
impl Error for PaintError
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<DumbError> for PaintError
impl From<DumbError> for PaintError
Source§impl From<PaintError> for PresentError
impl From<PaintError> for PresentError
Source§fn from(error: PaintError) -> Self
fn from(error: PaintError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PaintError
impl RefUnwindSafe for PaintError
impl Send for PaintError
impl Sync for PaintError
impl Unpin for PaintError
impl UnsafeUnpin for PaintError
impl UnwindSafe for PaintError
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