#[non_exhaustive]pub enum Error {
Unsupported,
LibraryLoad(String),
Backend(String),
Disconnected,
}Expand description
Errors produced by ldtray.
The most important variants for daemons are Error::Unsupported and
Error::LibraryLoad: both mean “no tray here, but nothing is wrong with
your program”. Treating them as non-fatal is the intended usage.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unsupported
The current platform has no tray backend, or no display/session is available (for example a headless server, or an unknown target OS).
LibraryLoad(String)
A required platform library could not be loaded at runtime. The string carries the underlying loader message. This is the expected error on a machine where the GUI stack simply is not installed.
Backend(String)
The backend was reachable but rejected an operation. The string carries a human-readable description.
Disconnected
The event loop is no longer running, so a crate::TrayHandle command
could not be delivered.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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
use the Display impl or to_string()