mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
update response namespace
This commit is contained in:
parent
70fc128c29
commit
4767929050
19 changed files with 59 additions and 50 deletions
|
|
@ -3,20 +3,14 @@ use std::fmt::{Display, Formatter, Result};
|
|||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
Connect(glib::Error),
|
||||
Connectable(String),
|
||||
Connection(crate::client::connection::Error),
|
||||
NetworkAddress(crate::gio::network_address::Error),
|
||||
OutputStream(glib::Error),
|
||||
Request(glib::Error),
|
||||
Response(crate::client::response::Error),
|
||||
}
|
||||
|
||||
impl Display for Error {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||
match self {
|
||||
Self::Connectable(uri) => {
|
||||
write!(f, "Could not create connectable address for {uri}")
|
||||
}
|
||||
Self::Connection(e) => {
|
||||
write!(f, "Connection error: {e}")
|
||||
}
|
||||
|
|
@ -26,15 +20,9 @@ impl Display for Error {
|
|||
Self::NetworkAddress(e) => {
|
||||
write!(f, "Network address error: {e}")
|
||||
}
|
||||
Self::OutputStream(e) => {
|
||||
write!(f, "Output stream error: {e}")
|
||||
}
|
||||
Self::Request(e) => {
|
||||
write!(f, "Request error: {e}")
|
||||
}
|
||||
Self::Response(e) => {
|
||||
write!(f, "Response error: {e}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue