pub struct Request<C>(/* private fields */);
Implementations§
source§impl<C> Request<C>where
C: Connection,
impl<C> Request<C>where
C: Connection,
pub fn wrap(connection: C) -> Request<C>
pub fn split(&mut self) -> (&C::Headers, &mut C::Read)
pub async fn into_response<'b>( self, status: u16, message: Option<&'b str>, headers: &'b [(&'b str, &'b str)], ) -> Result<Response<C>, C::Error>
pub async fn into_status_response( self, status: u16, ) -> Result<Response<C>, C::Error>
pub async fn into_ok_response(self) -> Result<Response<C>, C::Error>
pub fn connection(&mut self) -> &mut C
pub fn release(self) -> C
pub fn uri(&self) -> &str
pub fn method(&self) -> Method
pub fn header(&self, name: &str) -> Option<&str>
pub async fn read(&mut self, buf: &mut [u8]) -> Result<usize, C::Error>
Trait Implementations§
source§impl<C> Headers for Request<C>where
C: Connection,
impl<C> Headers for Request<C>where
C: Connection,
fn header(&self, name: &str) -> Option<&str>
fn content_type(&self) -> Option<&str>
fn content_len(&self) -> Option<u64>
fn content_encoding(&self) -> Option<&str>
fn transfer_encoding(&self) -> Option<&str>
fn host(&self) -> Option<&str>
fn connection(&self) -> Option<&str>
fn cache_control(&self) -> Option<&str>
fn upgrade(&self) -> Option<&str>
source§impl<C> Query for Request<C>where
C: Connection,
impl<C> Query for Request<C>where
C: Connection,
source§impl<C> Read for Request<C>where
C: Connection,
impl<C> Read for Request<C>where
C: Connection,
source§async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
source§async fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
async fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf
. Read more