feat: add impl Debug
This commit is contained in:
parent
e92f0c62a2
commit
6efe51bb15
3 changed files with 4 additions and 1 deletions
|
@ -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,
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Add table
Reference in a new issue