use core::{
error,
fmt::{self, Display, Formatter},
};
#[derive(Clone, Copy, Debug)]
pub enum LibcError {
Stdin,
Stdout,
Stderr,
}
impl error::Error for LibcError {}
impl Display for LibcError {
fn fmt(&self, formatter: &mut Formatter) -> fmt::Result {
match self {
Self::Stdin => write!(formatter, "failed to read stdin"),
Self::Stdout => write!(formatter, "failed to write stdout"),
Self::Stderr => write!(formatter, "failed to write stderr"),
}
}
}