pub enum RenderError {
DeviceLost {
reason: DeviceLostReason,
detail: String,
},
OutOfDeviceMemory(String),
SwapchainOutOfDate,
ShaderCompile(String),
Other(String),
}Expand description
A failure crossing the RenderBackend boundary, classified for recovery.
Variants§
DeviceLost
The device is gone; no further GPU work can succeed on it. detail is
backend prose for the log (e.g. the GetDeviceRemovedReason message).
OutOfDeviceMemory(String)
A GPU allocation failed for lack of device memory.
SwapchainOutOfDate
The swapchain no longer matches the surface; the frame did not present. Transient: the backend recreates the swapchain and the next frame normally succeeds.
ShaderCompile(String)
A shader failed to compile or link into a pipeline.
Other(String)
An unclassified failure carrying the original message.
Trait Implementations§
Source§impl Clone for RenderError
impl Clone for RenderError
Source§fn clone(&self) -> RenderError
fn clone(&self) -> RenderError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RenderError
impl Debug for RenderError
Source§impl Display for RenderError
impl Display for RenderError
impl Eq for RenderError
Source§impl Error for RenderError
impl Error for RenderError
1.30.0 · 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<&str> for RenderError
impl From<&str> for RenderError
Source§impl From<RenderError> for String
impl From<RenderError> for String
Source§fn from(error: RenderError) -> Self
fn from(error: RenderError) -> Self
Converts to this type from the input type.
Source§impl From<String> for RenderError
impl From<String> for RenderError
Source§impl PartialEq for RenderError
impl PartialEq for RenderError
impl StructuralPartialEq for RenderError
Auto Trait Implementations§
impl Freeze for RenderError
impl RefUnwindSafe for RenderError
impl Send for RenderError
impl Sync for RenderError
impl Unpin for RenderError
impl UnsafeUnpin for RenderError
impl UnwindSafe for RenderError
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§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.