mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-04-01 01:25:32 +00:00
update request api
This commit is contained in:
parent
52141f3dca
commit
5e52e74870
6 changed files with 37 additions and 78 deletions
|
|
@ -2,16 +2,16 @@ use std::fmt::{Display, Formatter, Result};
|
|||
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
Request((Vec<u8>, glib::Error)),
|
||||
Response(crate::client::connection::response::Error),
|
||||
Stream(glib::Error),
|
||||
TlsClientConnection(glib::Error),
|
||||
}
|
||||
|
||||
impl Display for Error {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||
match self {
|
||||
Self::Stream(e) => {
|
||||
write!(f, "TLS client connection error: {e}")
|
||||
Self::Request((_, e)) => {
|
||||
write!(f, "Request error: {e}")
|
||||
}
|
||||
Self::Response(e) => {
|
||||
write!(f, "Response error: {e}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue