mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
require Priority, Cancellable arguments, remove extra members
This commit is contained in:
parent
2df9f36599
commit
8f910672e2
7 changed files with 30 additions and 102 deletions
|
|
@ -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}")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue