require Priority, Cancellable arguments, remove extra members

This commit is contained in:
yggverse 2024-12-01 04:35:19 +02:00
parent 2df9f36599
commit 8f910672e2
7 changed files with 30 additions and 102 deletions

View file

@ -2,24 +2,12 @@ use std::fmt::{Display, Formatter, Result};
#[derive(Debug)]
pub enum Error {
Cancel,
Closed,
Rehandshake(glib::Error),
SocketConnection(glib::Error),
TlsClientConnection(glib::Error),
}
impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> Result {
match self {
Self::Cancel => write!(f, "Cancellable not found"),
Self::Closed => write!(f, "Connection closed"),
Self::Rehandshake(e) => {
write!(f, "Rehandshake error: {e}")
}
Self::SocketConnection(e) => {
write!(f, "Socket connection error: {e}")
}
Self::TlsClientConnection(e) => {
write!(f, "TLS client connection error: {e}")
}