pub enum ReadbackError {
DeviceLost,
MapFailed(String),
PollFailed(String),
}Expand description
Why an offscreen readback could not produce pixels.
Every variant means the same thing to a caller — no image this time — but they are kept apart because they point at different causes: a lost device is a driver / compositor event, a failed map is usually memory pressure.
Variants§
DeviceLost
map_async’s callback was dropped without firing — the device was lost
before the mapping completed.
MapFailed(String)
The buffer mapping itself failed.
PollFailed(String)
poll reported a failure before the mapping could be observed.
Trait Implementations§
Source§impl Debug for ReadbackError
impl Debug for ReadbackError
Source§impl Display for ReadbackError
impl Display for ReadbackError
Source§impl Error for ReadbackError
impl Error for ReadbackError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for ReadbackError
impl RefUnwindSafe for ReadbackError
impl Send for ReadbackError
impl Sync for ReadbackError
impl Unpin for ReadbackError
impl UnsafeUnpin for ReadbackError
impl UnwindSafe for ReadbackError
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