leanshot/src/xlib/errors.rs

23 lines
537 B
Rust
Raw Normal View History

2018-09-11 01:31:25 +00:00
/// Any error that can be raised when using this library.
#[allow(missing_docs)]
#[derive(Debug, Fail)]
pub enum X11Error {
2018-09-11 02:23:11 +00:00
#[fail(display = "failed to open display")]
DisplayOpenError,
2018-09-11 01:31:25 +00:00
#[fail(display = "failed to get attributes")]
GetAttributesError,
2018-09-11 02:23:11 +00:00
#[fail(display = "failed to get window")]
GetWindowError,
2018-09-11 01:31:25 +00:00
#[fail(display = "invalid byte order")]
InvalidByteOrder,
2018-09-11 02:23:11 +00:00
#[fail(display = "failed to translate coordinates")]
TranslateCoordinatesError,
2018-09-11 01:31:25 +00:00
#[fail(display = "error")]
Error,
}