#[non_exhaustive]pub enum WindowedLaunchError<E> {
Build(E),
EventLoop(EventLoopError),
}Available on crate feature
winit only.Expand description
The error Windowed’s Launch impl can fail with.
Spans the two independent ways launching a windowed backend can fail: the presenter builder’s
own PresenterBuilder::Error (a bad grid/font/tileset configuration), and
EventLoopError (winit’s event loop failing to start or to run). Kept as a small enum
naming both rather than degraded to a String: a caller matching on it can still tell which
half failed, and ? off of either PresenterBuilder::build_presenter or run_app_on
converts automatically.
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.
Build(E)
PresenterBuilder::build_presenter failed to build the presenter.
EventLoop(EventLoopError)
The winit event loop failed to start or failed while running.
Trait Implementations§
Source§impl<E: Debug> Debug for WindowedLaunchError<E>
impl<E: Debug> Debug for WindowedLaunchError<E>
Source§impl<E: Display> Display for WindowedLaunchError<E>
impl<E: Display> Display for WindowedLaunchError<E>
Source§impl<E: Error + 'static> Error for WindowedLaunchError<E>
impl<E: Error + 'static> Error for WindowedLaunchError<E>
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()
Auto Trait Implementations§
impl<E> !RefUnwindSafe for WindowedLaunchError<E>
impl<E> !UnwindSafe for WindowedLaunchError<E>
impl<E> Freeze for WindowedLaunchError<E>where
E: Freeze,
impl<E> Send for WindowedLaunchError<E>where
E: Send,
impl<E> Sync for WindowedLaunchError<E>where
E: Sync,
impl<E> Unpin for WindowedLaunchError<E>where
E: Unpin,
impl<E> UnsafeUnpin for WindowedLaunchError<E>where
E: UnsafeUnpin,
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
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>
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.Source§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.Source§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.Source§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.