pub enum AuthRejection {
Unauthorized(String),
Forbidden {
path: String,
action: String,
},
}Expand description
A request rejection caused by missing/invalid credentials.
Variants§
401 Unauthorized — missing or unverifiable token.
Forbidden
403 Forbidden — valid token but insufficient rights.
Trait Implementations§
Source§impl Debug for AuthRejection
impl Debug for AuthRejection
Source§impl Display for AuthRejection
impl Display for AuthRejection
Source§impl Error for AuthRejection
impl Error for AuthRejection
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<AuthError> for AuthRejection
impl From<AuthError> for AuthRejection
Source§impl IntoResponse for AuthRejection
impl IntoResponse for AuthRejection
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for AuthRejection
impl RefUnwindSafe for AuthRejection
impl Send for AuthRejection
impl Sync for AuthRejection
impl Unpin for AuthRejection
impl UnsafeUnpin for AuthRejection
impl UnwindSafe for AuthRejection
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