Struct stream_httparse::Request [−][src]
pub struct Request<'a> { /* fields omitted */ }
Expand description
Represents a single HTTP-Request
Implementations
impl<'a> Request<'a>
[src]
impl<'a> Request<'a>
[src]pub fn new(
protocol: &'a str,
method: Method,
path: &'a str,
headers: Headers<'a>,
body: &'a [u8]
) -> Self
[src]
pub fn new(
protocol: &'a str,
method: Method,
path: &'a str,
headers: Headers<'a>,
body: &'a [u8]
) -> Self
[src]Creates a new Request with the given Data as its initial Data
pub fn serialize(&self) -> (Vec<u8>, &[u8])
[src]
pub fn serialize(&self) -> (Vec<u8>, &[u8])
[src]Serializes the Request and returns the final Data as a tuple of (HTTP-Head, HTTP-Body)
pub fn header_mut(&mut self) -> &mut Headers<'a>
[src]
pub fn header_mut(&mut self) -> &mut Headers<'a>
[src]Returns a mutable Reference to the Headers of the Request
pub fn is_keep_alive(&self) -> bool
[src]
pub fn is_keep_alive(&self) -> bool
[src]Checks if the Requests expects a Keep-alive connection
pub fn set_path_ref<'b>(&mut self, n_path: &'b str) where
'b: 'a,
[src]
pub fn set_path_ref<'b>(&mut self, n_path: &'b str) where
'b: 'a,
[src]Overwrites the Path with the new Path
pub fn set_path_owned(&mut self, n_path: String)
[src]
pub fn set_path_owned(&mut self, n_path: String)
[src]Overwrites the Path with the new Path, but using an owned String instead of a reference
Trait Implementations
impl<'a> StructuralPartialEq for Request<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Request<'a>
impl<'a> Send for Request<'a>
impl<'a> Sync for Request<'a>
impl<'a> Unpin for Request<'a>
impl<'a> UnwindSafe for Request<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more