#[non_exhaustive]pub enum PushAuthError {
MissingToken,
InvalidToken(String),
UnverifiedEmail,
EmailNotAllowed(String),
}Expand description
Why a delivery’s token was refused.
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.
MissingToken
No Authorization: Bearer header.
InvalidToken(String)
The token does not verify: signature, issuer, audience, or lifetime.
UnverifiedEmail
The token names no email, or Google has not verified it.
EmailNotAllowed(String)
The token’s service account is not allowed.
Implementations§
Source§impl PushAuthError
impl PushAuthError
Sourcepub fn status(&self) -> StatusCode
pub fn status(&self) -> StatusCode
401 for a token that does not authenticate, 403 for one that names an account the
trigger does not allow.
Trait Implementations§
Source§impl Debug for PushAuthError
impl Debug for PushAuthError
Source§impl Display for PushAuthError
impl Display for PushAuthError
Source§impl Error for PushAuthError
impl Error for PushAuthError
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()
Auto Trait Implementations§
impl Forget for PushAuthError
impl Freeze for PushAuthError
impl Move for PushAuthError
impl RefUnwindSafe for PushAuthError
impl Send for PushAuthErrorwhere
RawVecInner: Send,
impl Sync for PushAuthErrorwhere
RawVecInner: Sync,
impl Unpin for PushAuthError
impl UnsafeUnpin for PushAuthError
impl UnwindSafe for PushAuthErrorwhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more