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()
Auto Trait Implementations§
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Errorwhere
RawVecInner: Sync,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more