mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-04-01 01:25:32 +00:00
24 lines
621 B
Rust
24 lines
621 B
Rust
use std::fmt::{Display, Formatter, Result};
|
|
|
|
#[derive(Debug)]
|
|
pub enum Error {
|
|
Connect(glib::Error),
|
|
Connection(crate::client::connection::Error),
|
|
Request(crate::client::connection::request::Error),
|
|
}
|
|
|
|
impl Display for Error {
|
|
fn fmt(&self, f: &mut Formatter) -> Result {
|
|
match self {
|
|
Self::Connection(e) => {
|
|
write!(f, "Connection error: {e}")
|
|
}
|
|
Self::Connect(e) => {
|
|
write!(f, "Connect error: {e}")
|
|
}
|
|
Self::Request(e) => {
|
|
write!(f, "Request error: {e}")
|
|
}
|
|
}
|
|
}
|
|
}
|