Struct http_auth::ChallengeRef [−][src]
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl TryFrom<&'_ ChallengeRef<'_>> for BasicClient
This is supported on crate feature basic-scheme
only.
impl TryFrom<&'_ ChallengeRef<'_>> for BasicClient
basic-scheme
only.impl TryFrom<&'_ ChallengeRef<'_>> for DigestClient
This is supported on crate feature digest-scheme
only.
impl TryFrom<&'_ ChallengeRef<'_>> for DigestClient
digest-scheme
only.Tries to create a PasswordClient
from the single supplied challenge.
This is a convenience wrapper around PasswordClientBuilder
.
Auto Trait Implementations
impl<'i> RefUnwindSafe for ChallengeRef<'i>
impl<'i> Send for ChallengeRef<'i>
impl<'i> Sync for ChallengeRef<'i>
impl<'i> Unpin for ChallengeRef<'i>
impl<'i> UnwindSafe for ChallengeRef<'i>
Blanket Implementations
Mutably borrows from an owned value. Read more