#[non_exhaustive]pub enum GpuDiagnostic {
UncapturedError {
kind: GpuErrorKind,
message: String,
},
DeviceLost {
reason: String,
message: String,
},
}Expand description
A device-level GPU event that no call return value reports.
These arrive asynchronously from the driver, so an embedding application
observes them through GpuContext::set_diagnostic_handler rather than
from the call that triggered them.
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.
UncapturedError
The driver reported an error that no pending call returned.
Fields
§
kind: GpuErrorKindWhich of WebGPU’s error classes it was.
DeviceLost
The device was lost and can no longer serve work.
Implementations§
Source§impl GpuDiagnostic
impl GpuDiagnostic
Sourcepub const fn failure_code(&self) -> &'static str
pub const fn failure_code(&self) -> &'static str
The export failure class this event is evidence of:
OUT_OF_MEMORY, VALIDATION_FAILED, DEVICE_LOST, or UNKNOWN for
an internal error, which names no cause.
Trait Implementations§
Source§impl Clone for GpuDiagnostic
impl Clone for GpuDiagnostic
Source§impl Debug for GpuDiagnostic
impl Debug for GpuDiagnostic
Source§impl Display for GpuDiagnostic
impl Display for GpuDiagnostic
impl Eq for GpuDiagnostic
Source§impl PartialEq for GpuDiagnostic
impl PartialEq for GpuDiagnostic
impl StructuralPartialEq for GpuDiagnostic
Auto Trait Implementations§
impl Freeze for GpuDiagnostic
impl RefUnwindSafe for GpuDiagnostic
impl Send for GpuDiagnostic
impl Sync for GpuDiagnostic
impl Unpin for GpuDiagnostic
impl UnsafeUnpin for GpuDiagnostic
impl UnwindSafe for GpuDiagnostic
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.