#[non_exhaustive]pub enum SurfaceError {
NotSupported(&'static str),
NoDevice(String),
DeviceChanged,
WrongDevice,
Format(String),
Size(String),
Timeout,
Busy,
Platform(String),
FormatMismatch {
surface: SurfaceFormat,
frame: SurfaceFormat,
},
}Expand description
Why a surface call failed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotSupported(&'static str)
This platform or renderer has no such path; the message says which one to use.
SurfaceHandle::present_bgra works everywhere.
NoDevice(String)
The renderer has no device yet (no window has drawn) or could not make one.
DeviceChanged
The renderer recreated its device: ask for the device again and recreate textures (or reopen shared ones) on it.
WrongDevice
The texture was made on another device; open it as a SharedTexture instead.
Format(String)
A pixel format the renderer cannot take; the message names it.
Size(String)
A zero or oversized frame, or a buffer too short for it.
Timeout
The keyed mutex was not released to the acquire key, or the fence not signalled, in time; nothing was presented.
Busy
Every surface texture is still being copied or shown; nothing was presented.
Platform(String)
The platform call failed; the message carries its error.
FormatMismatch
The frame’s format is not the one the surface is set to (SurfaceHandle::set_format).
Trait Implementations§
Source§impl Clone for SurfaceError
impl Clone for SurfaceError
Source§impl Debug for SurfaceError
impl Debug for SurfaceError
Source§impl Display for SurfaceError
impl Display for SurfaceError
impl Eq for SurfaceError
Source§impl Error for SurfaceError
impl Error for SurfaceError
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()
Source§impl PartialEq for SurfaceError
impl PartialEq for SurfaceError
impl StructuralPartialEq for SurfaceError
Auto Trait Implementations§
impl Forget for SurfaceError
impl Freeze for SurfaceError
impl Move for SurfaceError
impl RefUnwindSafe for SurfaceError
impl Send for SurfaceError
impl Sync for SurfaceError
impl Unpin for SurfaceError
impl UnsafeUnpin for SurfaceError
impl UnwindSafe for SurfaceError
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> 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§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
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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