logo
pub struct Response {
    pub status_code: u16,
    /* private fields */
}
Expand description

An HTTP response object sent back from a server.

Fields

status_code: u16

HTTP status code. If it’s different from the 200 range (from 200 to 299), indicates a failure that needs to be handled.

Implementations

Consumes the Response object into the bytes it contains.

Bytes sent back from the server.

Bytes sent back from the server, interpreted as a string. Can fail if the bytes don’t represent a valid utf8 encoding.

Bytes sent back from the server, interpreted as a string. Will interpret invalid utf8 encodings loosely, so as to return something.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.