[][src]Struct hyper::client::response::Response

pub struct Response {
    pub status: StatusCode,
    pub headers: Headers,
    pub version: HttpVersion,
    pub url: Url,
    // some fields omitted
}

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]

Read the response body.

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<R> ReadBytesExt for R where
    R: Read + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any
[src]