implement errors handler

This commit is contained in:
yggverse 2024-11-27 16:46:34 +02:00
parent cc0625d920
commit c7f992e1b3

View file

@ -0,0 +1,16 @@
use std::fmt::{Display, Formatter, Result};
#[derive(Debug)]
pub enum Error {
Host(String),
}
impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> Result {
match self {
Self::Host(url) => {
write!(f, "Host required for {url}")
}
}
}
}