feat: add impl Debug

This commit is contained in:
DarkCat09 2024-08-01 10:32:55 +04:00
parent e92f0c62a2
commit 6efe51bb15
Signed by: DarkCat09
GPG key ID: 0A26CD5B3345D6E3
3 changed files with 4 additions and 1 deletions

View file

@ -1,3 +1,4 @@
#[derive(Debug)]
pub enum LibError { pub enum LibError {
IoError(std::io::Error), IoError(std::io::Error),
InvalidUrlError(InvalidUrl), InvalidUrlError(InvalidUrl),
@ -48,6 +49,7 @@ impl From<mime::FromStrError> for LibError {
} }
} }
#[derive(Debug)]
pub enum InvalidUrl { pub enum InvalidUrl {
ParseError(url::ParseError), ParseError(url::ParseError),
SchemeNotGemini, SchemeNotGemini,

View file

@ -2,6 +2,7 @@ use crate::{status::Status, LibError};
type BodyStream = tokio_rustls::client::TlsStream<tokio::net::TcpStream>; type BodyStream = tokio_rustls::client::TlsStream<tokio::net::TcpStream>;
#[derive(Debug)]
pub struct Response { pub struct Response {
status: Status, status: Status,
message: String, message: String,

View file

@ -2,7 +2,7 @@ use crate::error::LibError;
use num_enum::{IntoPrimitive, TryFromPrimitive}; use num_enum::{IntoPrimitive, TryFromPrimitive};
#[derive(Clone, Copy)] #[derive(Debug, Clone, Copy)]
pub struct Status { pub struct Status {
status_code: StatusCode, status_code: StatusCode,
reply_type: ReplyType, reply_type: ReplyType,