aboutsummaryrefslogtreecommitdiffstats
path: root/src/error.rs
blob: f2e774ed4392c3b43abb107abd9d20a60a3f91ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[derive(thiserror::Error, Debug)]
pub enum Error {
    #[error("error reading from stdin")]
    ReadStdin(#[source] std::io::Error),

    #[error("error enabling terminal raw mode")]
    SetRaw(#[source] nix::Error),

    #[error("error restoring terminal from raw mode")]
    UnsetRaw(#[source] nix::Error),

    #[error("error writing to stdout")]
    WriteStdout(#[source] std::io::Error),
}

pub type Result<T> = std::result::Result<T, Error>;