mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-04-01 01:25:32 +00:00
update response namespace
This commit is contained in:
parent
70fc128c29
commit
4767929050
19 changed files with 59 additions and 50 deletions
|
|
@ -1,33 +0,0 @@
|
|||
use std::fmt::{Display, Formatter, Result};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
Data(super::data::Error),
|
||||
InputStream(Vec<u8>, glib::Error),
|
||||
Mime(super::mime::Error),
|
||||
Protocol,
|
||||
Status(super::status::Error),
|
||||
}
|
||||
|
||||
impl Display for Error {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||
match self {
|
||||
Self::Data(e) => {
|
||||
write!(f, "Data error: {e}")
|
||||
}
|
||||
Self::InputStream(_, e) => {
|
||||
// @TODO
|
||||
write!(f, "Input stream error: {e}")
|
||||
}
|
||||
Self::Mime(e) => {
|
||||
write!(f, "MIME error: {e}")
|
||||
}
|
||||
Self::Protocol => {
|
||||
write!(f, "Protocol error")
|
||||
}
|
||||
Self::Status(e) => {
|
||||
write!(f, "Status error: {e}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue