#![allow(clippy::module_name_repetitions)] use {crossterm::ErrorKind, thiserror::Error as ThisError};
#[derive(Debug, ThisError)]
#[error(transparent)]
pub enum CreateTerminalError {
Init(#[from] InitError),
}
#[derive(Debug, market::ConsumeFault, ThisError)]
#[error(transparent)]
pub enum UserActionFailure {
Poll(#[from] PollFailure),
Read(#[from] ReadFailure),
}
#[derive(Debug, market::ProduceFault, ThisError)]
#[error(transparent)]
pub enum DisplayCmdFailure {
Write(#[from] WriteFailure),
End(#[from] ReachedEnd),
}
#[derive(Debug, ThisError)]
#[error("writing: {error}")]
pub struct WriteFailure {
#[from]
error: ErrorKind,
}
#[derive(Debug, ThisError)]
#[error("clearing screen: {error}")]
pub struct InitError {
#[from]
error: ErrorKind,
}
#[derive(Debug, ThisError)]
#[error("unable to poll: {error}")]
pub struct PollFailure {
#[from]
error: ErrorKind,
}
#[derive(Debug, ThisError)]
#[error("unable to read: {error}")]
pub struct ReadFailure {
#[from]
error: ErrorKind,
}
#[derive(Debug, ThisError)]
#[error("leaving alternate screen: {error}")]
pub(crate) struct DestroyError {
#[from]
error: ErrorKind,
}
#[derive(Clone, Copy, Debug, ThisError)]
#[error("")]
pub struct ReachedEnd;