native_dialog/
errors.rs

1use std::ffi::OsString;
2
3use thiserror::Error;
4
5pub type Result<T = ()> = std::result::Result<T, Error>;
6
7#[derive(Error, Debug)]
8pub enum Error {
9    #[error("system error or I/O failure")]
10    Io(#[from] std::io::Error),
11
12    #[error("invalid utf-8 string")]
13    Utf8(#[from] std::string::FromUtf8Error),
14
15    #[error("cannot find implementation (kdialog/zenity)")]
16    MissingDep,
17
18    #[error("subprocess killed by signal")]
19    Killed(OsString),
20
21    #[error("other errors reported by implementation")]
22    Other(String),
23}