Add further impl for mainloop
This commit is contained in:
+13
-7
@@ -1,10 +1,10 @@
|
||||
use std::str::FromStr;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct ReqLine {
|
||||
pub(crate) method: String,
|
||||
pub(crate) route: String,
|
||||
pub(crate) version: String,
|
||||
pub struct ReqLine {
|
||||
pub method: String,
|
||||
pub route: String,
|
||||
pub version: String,
|
||||
}
|
||||
|
||||
impl FromStr for ReqLine {
|
||||
@@ -26,9 +26,9 @@ impl FromStr for ReqLine {
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct Header {
|
||||
pub(crate) key: String,
|
||||
pub(crate) value: String,
|
||||
pub struct Header {
|
||||
pub key: String,
|
||||
pub value: String,
|
||||
}
|
||||
|
||||
impl FromStr for Header {
|
||||
@@ -44,3 +44,9 @@ impl FromStr for Header {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Request {
|
||||
pub req_line: ReqLine,
|
||||
pub headers: Vec<Header>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user