#[non_exhaustive]pub struct MissingScopes { /* private fields */ }Expand description
A token that is valid but lacks scopes a route or operation requires; see
AuthorizedToken::require_scopes. It answers with 403
insufficient_scope: convert it with ? (or From) into
TokenRejection::InsufficientScope, and build the response with
crate::refusal_for_scopes so the challenge names what was required.
Scopes are not secret; Display names the missing ones.
#[non_exhaustive]: read it through its accessors.
Implementations§
Trait Implementations§
Source§impl Clone for MissingScopes
impl Clone for MissingScopes
Source§impl Debug for MissingScopes
impl Debug for MissingScopes
Source§impl Display for MissingScopes
impl Display for MissingScopes
impl Eq for MissingScopes
Source§impl Error for MissingScopes
impl Error for MissingScopes
1.30.0 · 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<MissingScopes> for TokenRejection
impl From<MissingScopes> for TokenRejection
Source§fn from(_: MissingScopes) -> Self
fn from(_: MissingScopes) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MissingScopes
impl PartialEq for MissingScopes
impl StructuralPartialEq for MissingScopes
Auto Trait Implementations§
impl Freeze for MissingScopes
impl RefUnwindSafe for MissingScopes
impl Send for MissingScopes
impl Sync for MissingScopes
impl Unpin for MissingScopes
impl UnsafeUnpin for MissingScopes
impl UnwindSafe for MissingScopes
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