Struct unc_jsonrpc_client::auth::Authorization
source · pub struct Authorization(/* private fields */);Expand description
unc JSON RPC authorization header.
Implementations§
source§impl Authorization
impl Authorization
pub const HEADER_NAME: &'static str = "Authorization"
sourcepub fn bearer<T: AsRef<str>>(token: T) -> Result<Self, InvalidHeaderValue>
pub fn bearer<T: AsRef<str>>(token: T) -> Result<Self, InvalidHeaderValue>
Creates a new authorization token with the bearer scheme.
This does not perform any token-specific validation on the token.
See the auth module documentation for more information.
sourcepub fn scheme(&self) -> AuthorizationScheme
pub fn scheme(&self) -> AuthorizationScheme
Returns the scheme of the authorization header.
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 Hash for Authorization
impl Hash for Authorization
source§impl HeaderEntry for Authorization
impl HeaderEntry for Authorization
type HeaderName = &'static str
type HeaderValue = HeaderValue
fn header_name(&self) -> &Self::HeaderName
fn header_pair(self) -> (Self::HeaderName, Self::HeaderValue)
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 Eq for Authorization
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> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CallHasher for T
impl<T> CallHasher for T
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.