Struct typed_headers::ProxyAuthorization [−][src]
pub struct ProxyAuthorization(pub Credentials);
Proxy-Authorization header, defined in RFC7235
The Proxy-Authorization header field allows a user agent to authenticate
itself with an HTTP proxy -- usually, but not necessarily, after
receiving a 407 (Proxy Authentication Required) response and the
Proxy-Authenticate header. Its value consists of credentials containing
the authentication information of the user agent for the realm of the
resource being requested.
ABNF
Authorization = credentials
Example values
Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==Bearer fpKL54jvWmEGVoRdCNjG
Methods from Deref<Target = Credentials>
pub fn scheme(&self) -> &AuthScheme[src]
pub fn scheme(&self) -> &AuthSchemeReturns the auth-scheme associated with the credentials.
pub fn token68(&self) -> Option<&Token68>[src]
pub fn token68(&self) -> Option<&Token68>Returns the token68 value associated with the credentials if present.
pub fn as_bearer(&self) -> Option<&Token68>[src]
pub fn as_bearer(&self) -> Option<&Token68>Returns the bearer token if this contains Bearer credentials.
Trait Implementations
impl Clone for ProxyAuthorization[src]
impl Clone for ProxyAuthorizationfn clone(&self) -> ProxyAuthorization[src]
fn clone(&self) -> ProxyAuthorizationReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for ProxyAuthorization[src]
impl Debug for ProxyAuthorizationfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for ProxyAuthorization[src]
impl PartialEq for ProxyAuthorizationfn eq(&self, other: &ProxyAuthorization) -> bool[src]
fn eq(&self, other: &ProxyAuthorization) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &ProxyAuthorization) -> bool[src]
fn ne(&self, other: &ProxyAuthorization) -> boolThis method tests for !=.
impl Deref for ProxyAuthorization[src]
impl Deref for ProxyAuthorizationtype Target = Credentials
The resulting type after dereferencing.
fn deref(&self) -> &Credentials[src]
fn deref(&self) -> &CredentialsDereferences the value.
impl DerefMut for ProxyAuthorization[src]
impl DerefMut for ProxyAuthorizationfn deref_mut(&mut self) -> &mut Credentials[src]
fn deref_mut(&mut self) -> &mut CredentialsMutably dereferences the value.
impl Header for ProxyAuthorization[src]
impl Header for ProxyAuthorizationfn name() -> &'static HeaderName[src]
fn name() -> &'static HeaderNameReturns the name of this header. Read more
fn from_values(
values: &mut ValueIter<HeaderValue>
) -> Result<Option<ProxyAuthorization>, Error>[src]
fn from_values(
values: &mut ValueIter<HeaderValue>
) -> Result<Option<ProxyAuthorization>, Error>Parses the header from the raw value bytes. Read more
fn to_values(&self, values: &mut ToValues)[src]
fn to_values(&self, values: &mut ToValues)Serializes the header to raw values. Read more
Auto Trait Implementations
impl Send for ProxyAuthorization
impl Send for ProxyAuthorizationimpl Sync for ProxyAuthorization
impl Sync for ProxyAuthorization