Struct oxide_auth::frontends::simple::request::Response[][src]

pub struct Response {
    pub status: Status,
    pub location: Option<Url>,
    pub www_authenticate: Option<String>,
    pub body: Option<Body>,
}
Expand description

Open and simple implementation of WebResponse.

Fields

status: Status

HTTP status code.

location: Option<Url>

A location header, for example for redirects.

www_authenticate: Option<String>

Indicates how the client should have authenticated.

Only set with Unauthorized status.

body: Option<Body>

Encoded body of the response.

One variant for each possible encoding type.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

A response which will redirect the user-agent to which the response is issued.

Set the response status to 400.

Set the response status to 401 and add a WWW-Authenticate header.

A pure text response with no special media type set.

Json repsonse data, with media type `aplication/json.

The error generated when trying to construct an unhandled or invalid response.

Set the response status to 200.

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

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.