2021-02-11 22:35:53 +01:00
|
|
|
use x11rb::errors::{ConnectError, ConnectionError, ReplyError};
|
|
|
|
|
use x11rb::protocol::xproto::Atom;
|
2019-12-19 05:47:36 +01:00
|
|
|
|
|
|
|
|
#[must_use]
|
2021-02-11 22:35:53 +01:00
|
|
|
#[derive(Debug, thiserror::Error)]
|
2019-12-19 05:47:36 +01:00
|
|
|
pub enum Error {
|
2021-02-11 22:35:53 +01:00
|
|
|
#[error("connection failed: {0}")]
|
|
|
|
|
ConnectionFailed(#[from] ConnectError),
|
|
|
|
|
#[error("connection errored: {0}")]
|
|
|
|
|
ConnectionErrored(#[from] ConnectionError),
|
|
|
|
|
#[error("reply failed: {0}")]
|
|
|
|
|
ReplyError(#[from] ReplyError),
|
|
|
|
|
#[error("timeout")]
|
2019-12-19 05:47:36 +01:00
|
|
|
Timeout,
|
2021-02-11 22:35:53 +01:00
|
|
|
#[error("unexpected type: {0}")]
|
2019-12-19 05:47:36 +01:00
|
|
|
UnexpectedType(Atom),
|
|
|
|
|
}
|