pub enum CurrentSurfaceTexture {
Success(SurfaceTexture),
Suboptimal(SurfaceTexture),
Timeout,
Occluded,
Outdated,
Lost,
Validation,
}Expand description
Result of a call to Surface::get_current_texture.
See variant documentation for how to handle each case.
Variants§
Success(SurfaceTexture)
Successfully acquired a surface texture with no issues.
Suboptimal(SurfaceTexture)
Successfully acquired a surface texture, but texture no longer matches the properties of the underlying surface.
It’s highly recommended to call Surface::configure again for optimal performance.
Timeout
A timeout was encountered while trying to acquire the next frame.
Applications should skip the current frame and try again later.
Occluded
The window is occluded (e.g. minimized or behind another window).
Applications should skip the current frame and try again once the window is no longer occluded.
Outdated
The underlying surface has changed, and therefore the surface configuration is outdated.
Call Surface::configure() and try again.
Lost
The surface has been lost and needs to be recreated.
If the device as a whole is lost (see set_device_lost_callback()), then
you need to recreate the device and all resources.
Otherwise, call Instance::create_surface() to recreate the surface,
then Surface::configure(), and try again.
Validation
A validation error inside Surface::get_current_texture() was raised
and caught by an error scope or
on_uncaptured_error().
Applications should attend to the validation error and try again.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CurrentSurfaceTexture
impl !RefUnwindSafe for CurrentSurfaceTexture
impl Send for CurrentSurfaceTexture
impl Sync for CurrentSurfaceTexture
impl Unpin for CurrentSurfaceTexture
impl !UnwindSafe for CurrentSurfaceTexture
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