#[non_exhaustive]
pub enum PasswordClient {
    Basic(BasicClient),
    Digest(DigestClient),
}
Expand description

Client for responding to a password challenge.

Typically created via TryFrom implementations for a parsed challenge (crate::ChallengeRef) or unparsed challenges (str, http::header::HeaderValue, or http::header::GetAll). See full example in the crate-level documentation.

For more complex scenarios, see PasswordClientBuilder.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Basic(BasicClient)

Available on crate feature basic-scheme only.
§

Digest(DigestClient)

Available on crate feature digest-scheme only.

Implementations§

Builds a new PasswordClient.

See example at PasswordClientBuilder.

Responds to the challenge with the supplied parameters.

The caller should use the returned string as an Authorization or Proxy-Authorization header value.

Trait Implementations§

Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

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.

Tries to create a PasswordClient from the supplied HeaderValue challenge list.

This is a convenience wrapper around PasswordClientBuilder.

The type returned in the event of a conversion error.
Performs the conversion.

Tries to create a PasswordClient forom the supplied str challenge list.

This is a convenience wrapper around PasswordClientBuilder.

The type returned in the event of a conversion error.
Performs the conversion.

Tries to create a PasswordClient from the supplied http::header::GetAll challenge lists.

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

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
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.