mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
draft new api version
This commit is contained in:
parent
67d486cc4d
commit
3a9e84a3d9
19 changed files with 490 additions and 87 deletions
16
src/client/connection/error.rs
Normal file
16
src/client/connection/error.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
use std::fmt::{Display, Formatter, Result};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
Closed,
|
||||
Tls(glib::Error),
|
||||
}
|
||||
|
||||
impl Display for Error {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||
match self {
|
||||
Self::Closed => write!(f, "Socket connection closed"),
|
||||
Self::Tls(reason) => write!(f, "Could not create TLS connection: {reason}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue