use thiserror::Error; /// The Result type used throughout pub type Result = std::result::Result; /// All errors that can be encountered when running #[derive(Debug, Error)] pub enum Error { #[error("xcb returned screen that doesn't exist")] NoSuchScreen, #[error("other wm is running")] OtherWMRunning, #[error("generic xcb error: {0}")] Xcb(#[from] xcb::Error), #[error("connection error: {0}")] Connection(#[from] xcb::ConnError), #[error("protocol error: {0}")] Protocol(#[from] xcb::ProtocolError), }