shadow_terminal/
errors.rs1#[derive(Debug, snafu::Snafu)]
7#[non_exhaustive]
8pub enum ShadowTerminalError {
9 #[snafu(display("PTY Error"))]
10 PTY {
12 source: PTYError,
14 },
15
16 #[snafu(display("SteppableTerminal Error"))]
17 SteppableTerminal {
19 source: SteppableTerminalError,
21 },
22
23 #[snafu(whatever, display("{message}"))]
25 Whatever {
26 message: String,
28 #[snafu(source(from(Box<dyn std::error::Error + Send + Sync>, Some)))]
30 source: Option<Box<dyn std::error::Error + Send + Sync>>,
31 },
32}
33
34#[derive(Debug, snafu::Snafu)]
36#[non_exhaustive]
37pub enum PTYError {
38 #[snafu(whatever, display("{message}"))]
40 Whatever {
41 message: String,
43 #[snafu(source(from(Box<dyn std::error::Error + Send + Sync>, Some)))]
45 source: Option<Box<dyn std::error::Error + Send + Sync>>,
46 },
47}
48
49#[derive(Debug, snafu::Snafu)]
51#[non_exhaustive]
52pub enum SteppableTerminalError {
53 #[snafu(whatever, display("{message}"))]
55 Whatever {
56 message: String,
58 #[snafu(source(from(Box<dyn std::error::Error + Send + Sync>, Some)))]
60 source: Option<Box<dyn std::error::Error + Send + Sync>>,
61 },
62}