2024-06-27 20:22:16 +01:00
|
|
|
use std::str::Utf8Error;
|
|
|
|
|
|
|
|
pub enum Error {
|
|
|
|
ReadError(std::io::Error),
|
|
|
|
Utf8Error(Utf8Error),
|
|
|
|
ParseError(String),
|
|
|
|
}
|
|
|
|
|
|
|
|
impl From<std::io::Error> for Error {
|
|
|
|
fn from(e: std::io::Error) -> Self {
|
|
|
|
Self::ReadError(e)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl From<Utf8Error> for Error {
|
|
|
|
fn from(e: Utf8Error) -> Self {
|
|
|
|
Self::Utf8Error(e)
|
|
|
|
}
|
|
|
|
}
|