#[non_exhaustive]pub enum SurfaceError {
Lost,
Outdated,
Timeout,
OutOfMemory,
}Expand description
Why a frame could not be acquired.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Lost
The surface is lost; reconfigure before the next acquire.
Outdated
The surface no longer matches the window; reconfigure.
Timeout
Acquisition timed out this frame.
OutOfMemory
The system is out of memory for surface buffers.
Trait Implementations§
Source§impl Clone for SurfaceError
impl Clone for SurfaceError
impl Copy 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)>
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<SurfaceError> for GpuError
impl From<SurfaceError> for GpuError
Source§fn from(source: SurfaceError) -> Self
fn from(source: SurfaceError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SurfaceError
impl PartialEq for SurfaceError
impl StructuralPartialEq for SurfaceError
Auto Trait Implementations§
impl Freeze 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
Mutably borrows from an owned value. Read more