pub enum Error {
NoAdapter,
Device(RequestDeviceError),
Map(BufferAsyncError),
Poll(PollError),
Read(MapRangeError),
}Expand description
What can go wrong between asking for a GPU and reading pixels back.
Variants§
NoAdapter
wgpu found no adapter at all. Headless CI runners without a software Vulkan are the usual reason.
Device(RequestDeviceError)
The adapter refused to hand out a device.
Map(BufferAsyncError)
Mapping the readback buffer failed.
Poll(PollError)
The device did not finish the work it was asked to wait for.
Read(MapRangeError)
The readback buffer could not be read once mapped.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<BufferAsyncError> for Error
impl From<BufferAsyncError> for Error
Source§fn from(source: BufferAsyncError) -> Self
fn from(source: BufferAsyncError) -> Self
Converts to this type from the input type.
Source§impl From<MapRangeError> for Error
impl From<MapRangeError> for Error
Source§fn from(source: MapRangeError) -> Self
fn from(source: MapRangeError) -> Self
Converts to this type from the input type.
Source§impl From<RequestDeviceError> for Error
impl From<RequestDeviceError> for Error
Source§fn from(source: RequestDeviceError) -> Self
fn from(source: RequestDeviceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze 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