lipl_display_common/
error.rs1use std::sync::mpsc::{SendError, TrySendError};
2use thiserror::Error;
3
4#[derive(Debug, Error)]
5pub enum Error {
6 #[error("IO error: {0}")]
7 IO(#[from] std::io::Error),
8
9 #[error("Try Send error: {0}")]
10 TrySend(#[from] TrySendError<()>),
11
12 #[error("Send error: {0}")]
13 Send(#[from] SendError<crate::Message>),
14
15 #[error("No bluetooth adapter found")]
16 BluetoothAdapter,
17
18 #[error("Cancelled")]
19 Cancelled,
20
21 #[error("Cannot send poweroff to login")]
22 Poweroff,
23
24 #[error("Hostname environment variable not set")]
25 Hostname,
26
27 #[error("Failed to call callback")]
28 Callback,
29
30 #[error("Error creating tokio runtime")]
31 Runtime,
32
33 #[error("Json serialization")]
34 JsonSerialization,
35
36 #[error("Parsing Gatt Characteristic value failed")]
37 GattCharaceristicValueParsing(String),
38}