pub enum Error {
Unsupported(&'static str),
OutOfMemory {
what: &'static str,
},
LimitExceeded {
what: &'static str,
requested: u64,
limit: u64,
},
ExternalImport(String),
DeviceLost,
Timeout {
what: &'static str,
},
Backend {
backend: &'static str,
detail: String,
},
}Variants§
Unsupported(&'static str)
The backend or driver does not support the requested operation.
Callers are expected to have checked crate::Capabilities first;
receiving this is a bug in the caller, not a condition to branch on at
the call site.
OutOfMemory
Device memory or host memory exhausted.
LimitExceeded
A requested resource exceeded a reported device limit.
ExternalImport(String)
A dma-buf could not be imported, usually a format or modifier the importing device does not accept.
DeviceLost
The device was lost. Everything created from it is invalid.
Timeout
A wait exceeded its timeout without what it waited for happening.
what names it, because a frame loop has more than one thing it can be
stuck on – a fence that never signals, a flip that never lands, a slot
that never comes free – and they have different causes. A single
message for all of them means reading the code and reasoning about
which timeout could have elapsed in the time the run took, which is what
this error made necessary once.
Backend
Backend-specific failure that has no portable representation.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()