#[non_exhaustive]pub enum ExtractTokenError {
    MissingAccessToken,
    FromHeader(ToStrError),
    InvalidAuthorizationScheme,
    FromQuery(Error),
}Available on crate feature 
api only.Expand description
An error that can occur when extracting an AuthScheme that expects an access token.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MissingAccessToken
No access token was found, but the endpoint requires one.
FromHeader(ToStrError)
Failed to convert the header value to a UTF-8 string.
InvalidAuthorizationScheme
The scheme of the Authorization HTTP header is invalid.
FromQuery(Error)
Failed to deserialize the query string.
Trait Implementations§
Source§impl Debug for ExtractTokenError
 
impl Debug for ExtractTokenError
Source§impl Display for ExtractTokenError
 
impl Display for ExtractTokenError
Source§impl Error for ExtractTokenError
 
impl Error for ExtractTokenError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
 
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
 
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for ExtractTokenError
 
impl From<Error> for ExtractTokenError
Source§fn from(source: Error) -> ExtractTokenError
 
fn from(source: Error) -> ExtractTokenError
Converts to this type from the input type.
Source§impl From<ToStrError> for ExtractTokenError
 
impl From<ToStrError> for ExtractTokenError
Source§fn from(source: ToStrError) -> ExtractTokenError
 
fn from(source: ToStrError) -> ExtractTokenError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ExtractTokenError
impl RefUnwindSafe for ExtractTokenError
impl Send for ExtractTokenError
impl Sync for ExtractTokenError
impl Unpin for ExtractTokenError
impl UnwindSafe for ExtractTokenError
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