use thiserror::Error;
#[derive(Error, Debug)]
pub enum TuiError {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("Terminal error: {0}")]
Terminal(String),
#[error("Interaction was canceled by the user")]
Canceled,
#[error("Validation error: {0}")]
Validation(String),
#[error("{0}")]
Other(String),
}
pub type Result<T> = std::result::Result<T, TuiError>;