pub enum RendererError {
Show 16 variants
RequestAdapterFailed,
RequestDeviceFailed(String),
SurfaceCapabilitiesUnavailable(&'static str),
SurfaceConfigFailed,
SurfaceRecreationRequired(&'static str),
SurfaceConfigureExhausted,
CaptureUnsupportedFormat(TextureFormat),
CaptureMapFailed(String),
FrameTextureUnavailable,
RenderTargetUnavailable(&'static str),
SurfaceAcquireFailed(String),
SurfaceAcquireTimeout,
SurfaceAcquireLost,
SurfaceAcquireOutdated,
SurfaceAcquireOutOfMemory,
SurfaceNotReady(String),
}Expand description
Failure during adapter/device setup, surface configuration, or capture readback.
§Examples
use ailloli_ui_render_wgpu::RendererError;
let error = RendererError::SurfaceAcquireTimeout;
assert!(error.to_string().contains("Timeout"));Variants§
RequestAdapterFailed
No adapter matching the requested backend and surface was available.
RequestDeviceFailed(String)
Device creation failed; the string contains wgpu’s diagnostic.
The surface returned no usable capabilities for the named property.
SurfaceConfigFailed
A surface configuration could not be constructed.
SurfaceRecreationRequired(&'static str)
The current renderer pipelines cannot be reused with the surface’s new preferred format. The presentation adapter must rebuild the renderer.
SurfaceConfigureExhausted
No compatible adapter succeeded at Surface::configure (wgpu 0.20 may panic instead of returning an error).
CaptureUnsupportedFormat(TextureFormat)
Capture was requested from a format not handled by the RGBA readback path.
CaptureMapFailed(String)
Mapping the GPU capture buffer failed.
A render target exposed only a view where a backing texture was required.
The requested renderer mode has no compatible render target.
SurfaceAcquireFailed(String)
Frame acquisition failed with an untyped host diagnostic.
SurfaceAcquireTimeout
Surface acquisition timed out; hosts may skip and retry a later frame.
SurfaceAcquireLost
The surface was lost and should be recreated or reconfigured.
SurfaceAcquireOutdated
The surface is outdated and should be reconfigured before retrying.
SurfaceAcquireOutOfMemory
The GPU cannot allocate the frame; callers should terminate rendering.
SurfaceNotReady(String)
The surface exists but is not ready, commonly because one axis is zero.
Implementations§
Source§impl RendererError
impl RendererError
Sourcepub fn from_surface_error(error: SurfaceError) -> Self
pub fn from_surface_error(error: SurfaceError) -> Self
Converts wgpu’s typed acquisition failure without string parsing.
§Examples
use ailloli_ui_render_wgpu::RendererError;
let error = RendererError::from_surface_error(wgpu::SurfaceError::Lost);
assert!(matches!(error, RendererError::SurfaceAcquireLost));Trait Implementations§
Source§impl Debug for RendererError
impl Debug for RendererError
Source§impl Display for RendererError
impl Display for RendererError
Source§impl Error for RendererError
impl Error for RendererError
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
Auto Trait Implementations§
impl Freeze for RendererError
impl RefUnwindSafe for RendererError
impl Send for RendererError
impl Sync for RendererError
impl Unpin for RendererError
impl UnwindSafe for RendererError
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
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