#[non_exhaustive]pub enum DeviceError {
Invalid(ResourceErrorIdent),
Lost,
OutOfMemory,
ResourceCreationFailed,
DeviceMismatch(Box<DeviceMismatch>),
}
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.
Invalid(ResourceErrorIdent)
Lost
OutOfMemory
ResourceCreationFailed
DeviceMismatch(Box<DeviceMismatch>)
Implementations§
Source§impl DeviceError
impl DeviceError
Sourcepub fn from_hal(error: DeviceError) -> Self
pub fn from_hal(error: DeviceError) -> Self
Only use this function in contexts where there is no Device
.
Use Device::handle_hal_error
otherwise.
Trait Implementations§
Source§impl Clone for DeviceError
impl Clone for DeviceError
Source§fn clone(&self) -> DeviceError
fn clone(&self) -> DeviceError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DeviceError
impl Debug for DeviceError
Source§impl<'de> Deserialize<'de> for DeviceError
impl<'de> Deserialize<'de> for DeviceError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DeviceError
impl Display for DeviceError
Source§impl Error for DeviceError
impl Error for DeviceError
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<Box<DeviceMismatch>> for DeviceError
impl From<Box<DeviceMismatch>> for DeviceError
Source§fn from(source: Box<DeviceMismatch>) -> Self
fn from(source: Box<DeviceMismatch>) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for BufferAccessError
impl From<DeviceError> for BufferAccessError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for ClearError
impl From<DeviceError> for ClearError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CommandEncoderError
impl From<DeviceError> for CommandEncoderError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for ComputePassErrorInner
impl From<DeviceError> for ComputePassErrorInner
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for ConfigureSurfaceError
impl From<DeviceError> for ConfigureSurfaceError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CopyError
impl From<DeviceError> for CopyError
Source§fn from(err: DeviceError) -> Self
fn from(err: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CreateBindGroupError
impl From<DeviceError> for CreateBindGroupError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CreateBindGroupLayoutError
impl From<DeviceError> for CreateBindGroupLayoutError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CreateBufferError
impl From<DeviceError> for CreateBufferError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CreateComputePipelineError
impl From<DeviceError> for CreateComputePipelineError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CreatePipelineCacheError
impl From<DeviceError> for CreatePipelineCacheError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CreatePipelineLayoutError
impl From<DeviceError> for CreatePipelineLayoutError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CreateQuerySetError
impl From<DeviceError> for CreateQuerySetError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CreateRenderPipelineError
impl From<DeviceError> for CreateRenderPipelineError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CreateSamplerError
impl From<DeviceError> for CreateSamplerError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CreateShaderModuleError
impl From<DeviceError> for CreateShaderModuleError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CreateTextureError
impl From<DeviceError> for CreateTextureError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for CreateTextureViewError
impl From<DeviceError> for CreateTextureViewError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for QueryError
impl From<DeviceError> for QueryError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for QueryUseError
impl From<DeviceError> for QueryUseError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for QueueSubmitError
impl From<DeviceError> for QueueSubmitError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for QueueWriteError
impl From<DeviceError> for QueueWriteError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for RenderPassErrorInner
impl From<DeviceError> for RenderPassErrorInner
Source§fn from(error: DeviceError) -> Self
fn from(error: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for RequestDeviceError
impl From<DeviceError> for RequestDeviceError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for SurfaceError
impl From<DeviceError> for SurfaceError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for WaitIdleError
impl From<DeviceError> for WaitIdleError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DeviceError
impl RefUnwindSafe for DeviceError
impl Send for DeviceError
impl Sync for DeviceError
impl Unpin for DeviceError
impl UnwindSafe for DeviceError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)