Struct http_auth::ChallengeRef[][src]

pub struct ChallengeRef<'i> {
    pub scheme: &'i str,
    pub params: Vec<(&'i str, ParamValue<'i>)>,
}
Expand description

Parsed challenge (scheme and body) using references to the original header value.

This is not directly useful for responding to a challenge; it’s an intermediary for constructing a PasswordClient or the like.

Only supports the param form, not the apocryphal token68 form, as described in crate::parser::ChallengeParser.

Fields

scheme: &'i str

The scheme name, which should be compared case-insensitively.

params: Vec<(&'i str, ParamValue<'i>)>

Zero or more parameters.

These are represented as a Vec of key-value pairs rather than a HashMap. Given that the parameters are generally only used once when constructing a challenge client and each challenge only supports a few parameter types, it’s more efficient in terms of CPU usage and code size to scan through them directly without constructing a throw-away HashMap.

Implementations

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.

Tries to create a PasswordClient from the single supplied challenge.

This is a convenience wrapper around PasswordClientBuilder.

The type returned in the event of a conversion error.

Performs the conversion.

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.