pub enum PlatformError {
EventLoop(EventLoopError),
Window(OsError),
Surface(SoftBufferError),
Renderer(String),
ClearColor,
}Expand description
Something that stopped a window from opening, running or presenting a frame.
Variants§
EventLoop(EventLoopError)
The event loop could not be created or run to completion.
Window(OsError)
The operating system refused to create the window.
Surface(SoftBufferError)
The software presentation surface could not be created, resized or presented.
Renderer(String)
The renderer could not be set up for the window.
This holds what went wrong: a value of the SMUDGE_RENDERER
environment variable that is not cpu, gpu or auto, a request
for the GPU renderer without the gpu feature, a request for the GPU
renderer with no usable adapter, or a window the GPU renderer cannot
present to.
ClearColor
The window options gave a clear color that is not opaque.
Presentation copies only the color channels of the surface into the window, so a clear color with any transparency cannot be shown.
Trait Implementations§
Source§impl Debug for PlatformError
impl Debug for PlatformError
Source§impl Display for PlatformError
impl Display for PlatformError
Source§impl Error for PlatformError
impl Error for PlatformError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for PlatformError
impl !Send for PlatformError
impl !Sync for PlatformError
impl !UnwindSafe for PlatformError
impl Freeze for PlatformError
impl Unpin for PlatformError
impl UnsafeUnpin for PlatformError
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.