lamco_data_control/
error.rs1#[derive(Debug, thiserror::Error)]
5#[non_exhaustive]
6pub enum Error {
7 #[error("cannot connect to the Wayland compositor: {0}")]
9 Connect(String),
10
11 #[error("the compositor offers neither ext-data-control-v1 nor wlr-data-control-unstable-v1")]
13 Unsupported,
14
15 #[error("the requested data-control protocol is not offered by the compositor")]
17 ProtocolUnavailable,
18
19 #[error("the compositor advertises no seat")]
21 NoSeat,
22
23 #[error("Wayland error: {0}")]
25 Wayland(String),
26
27 #[error("the clipboard worker has stopped")]
29 Stopped,
30
31 #[error("clipboard data of {size} bytes exceeds the {limit} byte limit")]
33 TooLarge {
34 size: usize,
36 limit: usize,
38 },
39
40 #[error("the clipboard source did not deliver its data in time")]
42 Timeout,
43
44 #[error("I/O error: {0}")]
46 Io(#[from] std::io::Error),
47}
48
49pub type Result<T> = std::result::Result<T, Error>;