Struct typed_headers::AuthScheme [−][src]
pub struct AuthScheme(_);
An authorization scheme.
Methods
impl AuthScheme
[src]
impl AuthScheme
pub const BASIC: AuthScheme
BASIC: AuthScheme = AuthScheme(Inner::BASIC)
Basic authentication, as defined in RFC7617.
pub const BEARER: AuthScheme
BEARER: AuthScheme = AuthScheme(Inner::BEARER)
Bearer authentication, as defined in RFC6750.
pub fn new(s: &str) -> Result<AuthScheme, Error>
[src]
pub fn new(s: &str) -> Result<AuthScheme, Error>
Constructs a new instance of this value from a string.
An error is returned if the string is not a valid token.
pub fn as_str(&self) -> &str
[src]
pub fn as_str(&self) -> &str
Returns the string representation of this token.
Trait Implementations
impl Debug for AuthScheme
[src]
impl Debug for AuthScheme
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for AuthScheme
[src]
impl Clone for AuthScheme
fn clone(&self) -> AuthScheme
[src]
fn clone(&self) -> AuthScheme
Returns 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)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for AuthScheme
[src]
impl PartialEq for AuthScheme
fn eq(&self, other: &AuthScheme) -> bool
[src]
fn eq(&self, other: &AuthScheme) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &AuthScheme) -> bool
[src]
fn ne(&self, other: &AuthScheme) -> bool
This method tests for !=
.
impl Eq for AuthScheme
[src]
impl Eq for AuthScheme
impl Display for AuthScheme
[src]
impl Display for AuthScheme
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl FromStr for AuthScheme
[src]
impl FromStr for AuthScheme
Auto Trait Implementations
impl Send for AuthScheme
impl Send for AuthScheme
impl Sync for AuthScheme
impl Sync for AuthScheme