update Response API

This commit is contained in:
yggverse 2025-02-02 22:12:40 +02:00
parent cdac038135
commit 5358e43697
25 changed files with 1102 additions and 502 deletions

View file

@ -0,0 +1,23 @@
use std::{
fmt::{Display, Formatter, Result},
str::Utf8Error,
};
#[derive(Debug)]
pub enum Error {
Code,
Utf8Error(Utf8Error),
}
impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> Result {
match self {
Self::Code => {
write!(f, "Status code error")
}
Self::Utf8Error(e) => {
write!(f, "UTF-8 error: {e}")
}
}
}
}