[−][src]Struct hyper::client::response::Response
A response for a client request to a remote server.
Fields
status: StatusCode
The status from the server.
headers: Headers
The headers from the server.
version: HttpVersion
The HTTP version of this response from the server.
url: Url
The final URL of this response.
Methods
impl Response
[src][−]
pub fn new(url: Url, stream: Box<dyn NetworkStream + Send>) -> Result<Response>
[src][−]
Creates a new response from a server.
pub fn with_message(url: Url, message: Box<dyn HttpMessage>) -> Result<Response>
[src][−]
Creates a new response received from the server on the given HttpMessage
.
pub fn status_raw(&self) -> &RawStatus
[src][−]
Get the raw status code and reason.
pub fn get_ref(&self) -> &dyn HttpMessage
[src][−]
Gets a borrowed reference to the underlying HttpMessage
.
Trait Implementations
impl Debug for Response
[src][+]
impl Drop for Response
[src][+]
impl Read for Response
[src][+]
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
[src][−]
fn read_vectored(&mut self, bufs: &mut [IoSliceMut]) -> Result<usize, Error>
1.36.0[src][−]
unsafe fn initializer(&self) -> Initializer
[src][−]
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
1.0.0[src][−]
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
1.0.0[src][−]
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
1.6.0[src][−]
fn by_ref(&mut self) -> &mut Self
1.0.0[src][−]
fn bytes(self) -> Bytes<Self>
1.0.0[src][−]
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: Read,
1.0.0[src][−]
R: Read,
fn take(self, limit: u64) -> Take<Self>
1.0.0[src][−]
Auto Trait Implementations
impl !RefUnwindSafe for Response
impl Send for Response
impl !Sync for Response
impl Unpin for Response
impl !UnwindSafe for Response
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<R> ReadBytesExt for R where
R: Read + ?Sized,
[src][+]
R: Read + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<T> Typeable for T where
T: Any,
[src][+]
T: Any,