pub enum ConfigSurfaceError {
CreateSurface(CreateSurfaceError),
InUse,
NotInitialized,
SurfaceError(SurfaceError),
Unsupported,
}Available on crate features
winit only.Expand description
Error returned when configuring a surface or making a texture view for the surface.
Variants§
CreateSurface(CreateSurfaceError)
wgpu could not create a surface, see
wgpu::Instance::create_surface.
InUse
The surface already has an active view - a new one can’t be created, nor can the current one be reconfigured.
NotInitialized
Can’t reconfigure the surface because it hasn’t been created or configured
yet. Non-fatal, but run SurfaceWindow::init_with_context first.
SurfaceError(SurfaceError)
Trying to use the surface failed. Non-fatal, but call
SurfaceWindow::drop_surface to re-initialize it. Also see
wgpu::SurfaceError.
Unsupported
The surface that tried to be configure wasn’t supported by this adapter. Don’t
mix & match resources between RenderContexts!
Trait Implementations§
Source§impl Clone for ConfigSurfaceError
impl Clone for ConfigSurfaceError
Source§fn clone(&self) -> ConfigSurfaceError
fn clone(&self) -> ConfigSurfaceError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfigSurfaceError
impl Debug for ConfigSurfaceError
Source§impl Display for ConfigSurfaceError
impl Display for ConfigSurfaceError
Source§impl Error for ConfigSurfaceError
impl Error for ConfigSurfaceError
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<BorrowMutError> for ConfigSurfaceError
impl From<BorrowMutError> for ConfigSurfaceError
Source§fn from(_e: BorrowMutError) -> Self
fn from(_e: BorrowMutError) -> Self
Converts to this type from the input type.
Source§impl From<ConfigSurfaceError> for CreateWindowError
impl From<ConfigSurfaceError> for CreateWindowError
Source§fn from(source: ConfigSurfaceError) -> Self
fn from(source: ConfigSurfaceError) -> Self
Converts to this type from the input type.
Source§impl From<CreateSurfaceError> for ConfigSurfaceError
impl From<CreateSurfaceError> for ConfigSurfaceError
Auto Trait Implementations§
impl Freeze for ConfigSurfaceError
impl !RefUnwindSafe for ConfigSurfaceError
impl Send for ConfigSurfaceError
impl Sync for ConfigSurfaceError
impl Unpin for ConfigSurfaceError
impl UnsafeUnpin for ConfigSurfaceError
impl !UnwindSafe for ConfigSurfaceError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.