#[non_exhaustive]pub enum RefreshError {
Unknown,
Expired,
Replay,
ChainRevoked,
Store(StoreError),
}Expand description
Errors raised by refresh-token rotation (cheers-server’s RefreshRotator).
Keyless, so it lives in the shared contract crate. #[non_exhaustive] so
future variants don’t break callers.
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.
Unknown
The presented token isn’t in the store.
Expired
expires_at <= now for this token.
Replay
The presented token has already been rotated. The chain is now revoked as
a side effect — every record sharing the chain id has revoked = true
after this error returns.
ChainRevoked
The chain was previously revoked (logout, device revoke, prior replay).
Store(StoreError)
Underlying RefreshStore failure.
Trait Implementations§
Source§impl Debug for RefreshError
impl Debug for RefreshError
Source§impl Display for RefreshError
impl Display for RefreshError
Source§impl Error for RefreshError
impl Error for RefreshError
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<RefreshError> for Error
impl From<RefreshError> for Error
Source§fn from(source: RefreshError) -> Self
fn from(source: RefreshError) -> Self
Converts to this type from the input type.
Source§impl From<StoreError> for RefreshError
impl From<StoreError> for RefreshError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RefreshError
impl RefUnwindSafe for RefreshError
impl Send for RefreshError
impl Sync for RefreshError
impl Unpin for RefreshError
impl UnsafeUnpin for RefreshError
impl UnwindSafe for RefreshError
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