mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
implement cancel action
This commit is contained in:
parent
6ee60e9d9d
commit
cdf35db0d6
2 changed files with 12 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ use std::fmt::{Display, Formatter, Result};
|
|||
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
Cancel,
|
||||
Closed,
|
||||
Rehandshake(glib::Error),
|
||||
SocketConnection(glib::Error),
|
||||
|
|
@ -11,6 +12,7 @@ pub enum 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}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue