pub enum CurrentSurfaceTexture {
Success(SurfaceTexture),
Suboptimal(SurfaceTexture),
Timeout,
Occluded,
Outdated,
Lost,
Validation,
}unstable-wgpu-29 only.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 UnsafeUnpin 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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.