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 moreAuto Trait Implementations§
impl<C> Freeze for Response<C>where
C: Freeze,
impl<C> RefUnwindSafe for Response<C>where
C: RefUnwindSafe,
impl<C> Send for Response<C>where
C: Send,
impl<C> Sync for Response<C>where
C: Sync,
impl<C> Unpin for Response<C>where
C: Unpin,
impl<C> UnsafeUnpin for Response<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for Response<C>where
C: UnwindSafe,
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