pub enum RunError {
NoWaylandConnection(String),
RegistryInit(String),
EventLoop(String),
MissingProtocol {
name: &'static str,
detail: String,
},
}Expand description
Reasons crate::try_run (and therefore crate::run) can fail
to bring up the event loop.
Every variant maps to a fatal failure during init: the Wayland
connection, the calloop event loop, or one of the protocol bindings
the runtime cannot operate without (wl_compositor, wl_shm,
xdg_wm_base). Once init succeeds, the compositor disconnecting
(BrokenPipe / ConnectionReset) is treated as a clean exit; any
other runtime error during the dispatch loop still panics, since the
surface is already on screen and the state machine cannot be unwound
from this entry point.
Embedders that want a software-rendered fallback or that need to
degrade gracefully should call crate::try_run and match on the
variants instead of letting crate::run panic.
Variants§
NoWaylandConnection(String)
WAYLAND_DISPLAY is unset, the socket is missing, or the
compositor refused the handshake. Includes the detailed reason
from the underlying wayland-client error.
RegistryInit(String)
The Wayland registry could not be enumerated. Almost always a compositor / driver bug — the registry is the first thing every Wayland client touches.
EventLoop(String)
calloop’s EventLoop::try_new or its Wayland source insertion
failed (typically an io error talking to the kernel).
MissingProtocol
A required Wayland protocol is missing from the compositor.
name is the wire-format protocol name; detail is the
underlying bind error.
Trait Implementations§
Source§impl Error for RunError
impl Error for RunError
1.30.0 · 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
Auto Trait Implementations§
impl Freeze for RunError
impl RefUnwindSafe for RunError
impl Send for RunError
impl Sync for RunError
impl Unpin for RunError
impl UnwindSafe for RunError
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