pub struct Request {
pub method: Method,
pub path: String,
pub querySeperator: char,
pub query: Vec<KeyValuePair>,
pub version: Version,
pub header: Vec<KeyValuePair>,
pub content: Vec<u8>,
}Expand description
Hyper Text Transfer Protocol Request.
Fields§
§method: MethodMethod to use to get the desired Resource.
path: StringPath to the desired Resource.
querySeperator: charWhen parsing a Request, how should I differentiate the Key Value Pairs of the Query?
query: Vec<KeyValuePair>List of Query Key Value Pairs.
version: VersionProtocol Version.
header: Vec<KeyValuePair>List of Header Key Value Pairs.
content: Vec<u8>Content of Request.
Implementations§
Source§impl Request
impl Request
Sourcepub fn ifChar<Inner>(
character: char,
stream: &mut TcpStream,
inner: Inner,
) -> Option<Inner>
pub fn ifChar<Inner>( character: char, stream: &mut TcpStream, inner: Inner, ) -> Option<Inner>
Read char from stream and compare it with character.
§Arguments
character–charto compare with,stream– Transmission Control Protocol Stream,inner– inner value to return on success.
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more