pub enum RenderError {
NotInitialized,
InitializationFailed(String),
SurfaceAcquisitionFailed(String),
RenderingFailed(String),
ResourceError(ResourceError),
DeviceLost,
DeviceOutOfMemory(String),
Internal(String),
}Expand description
A high-level error that can occur within the main rendering system or graphics device.
Variants§
NotInitialized
An operation was attempted before the rendering system was initialized.
InitializationFailed(String)
A failure occurred during the initialization of the graphics backend.
SurfaceAcquisitionFailed(String)
Failed to acquire the next frame from the swapchain/surface for rendering.
RenderingFailed(String)
A critical, unrecoverable rendering operation failed.
ResourceError(ResourceError)
An error occurred while managing a GPU resource.
DeviceLost
The graphics device was lost (e.g., GPU driver crashed or was updated). This is a catastrophic error that typically requires reinitialization.
DeviceOutOfMemory(String)
The graphics device or surface ran out of memory.
This is fatal but non-panicking: the frame loop surfaces it so the host can decide to shut down cleanly rather than crashing mid-frame.
Internal(String)
An unexpected or internal error occurred.
Implementations§
Source§impl RenderError
impl RenderError
Sourcepub fn is_fatal(&self) -> bool
pub fn is_fatal(&self) -> bool
Whether this error is fatal — i.e. the render system cannot make progress on subsequent frames and the host should tear down or reinitialize rather than retry.
Transient acquisition failures (surface lost/outdated/timeout, occluded or zero-size windows) are not fatal: the loop skips the frame and retries. Device loss and out-of-memory are fatal.
Trait Implementations§
Source§impl Debug for RenderError
impl Debug for RenderError
Source§impl Display for RenderError
impl Display for RenderError
Source§impl Error for RenderError
impl Error for RenderError
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()