pub struct Response<C>(/* private fields */);
Implementations§
source§impl<C> Response<C>where
C: Connection,
impl<C> Response<C>where
C: Connection,
pub fn wrap(connection: C) -> Response<C>
pub fn split(&mut self) -> (&C::Headers, &mut C::Read)
pub fn connection(&mut self) -> &mut C
pub fn release(self) -> C
pub fn status(&self) -> u16
pub fn status_message(&self) -> Option<&str>
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 Response<C>where
C: Connection,
impl<C> Headers for Response<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> Read for Response<C>where
C: Connection,
impl<C> Read for Response<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