Struct twilio_async::Authorization
source · pub struct Authorization(pub Credentials);
Expand description
Authorization
header, defined in RFC7235
The Authorization
header field allows a user agent to authenticate
itself with an origin server – usually, but not necessarily, after
receiving a 401 (Unauthorized) response. 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
Tuple Fields§
§0: Credentials
Methods from Deref<Target = Credentials>§
sourcepub fn scheme(&self) -> &AuthScheme
pub fn scheme(&self) -> &AuthScheme
Returns the auth-scheme associated with the credentials.
Trait Implementations§
source§impl Clone for Authorization
impl Clone for Authorization
source§fn clone(&self) -> Authorization
fn clone(&self) -> Authorization
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Authorization
impl Debug for Authorization
source§impl Deref for Authorization
impl Deref for Authorization
§type Target = Credentials
type Target = Credentials
The resulting type after dereferencing.
source§fn deref(&self) -> &Credentials
fn deref(&self) -> &Credentials
Dereferences the value.
source§impl DerefMut for Authorization
impl DerefMut for Authorization
source§fn deref_mut(&mut self) -> &mut Credentials
fn deref_mut(&mut self) -> &mut Credentials
Mutably dereferences the value.
source§impl Header for Authorization
impl Header for Authorization
source§fn name() -> &'static HeaderName
fn name() -> &'static HeaderName
Returns the name of this header. Read more
source§fn from_values(
values: &mut ValueIter<'_, HeaderValue>,
) -> Result<Option<Authorization>, Error>
fn from_values( values: &mut ValueIter<'_, HeaderValue>, ) -> Result<Option<Authorization>, Error>
Parses the header from the raw value bytes. Read more
source§impl PartialEq for Authorization
impl PartialEq for Authorization
source§fn eq(&self, other: &Authorization) -> bool
fn eq(&self, other: &Authorization) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for Authorization
Auto Trait Implementations§
impl Freeze for Authorization
impl RefUnwindSafe for Authorization
impl Send for Authorization
impl Sync for Authorization
impl Unpin for Authorization
impl UnwindSafe for Authorization
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)