#[non_exhaustive]pub enum Error {
Codec(CodecError),
Store(StoreError),
Refresh(RefreshError),
Revoked,
InvalidInput(String),
}Expand description
Top-level cheers error. #[non_exhaustive] so new variants are non-breaking.
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.
Codec(CodecError)
Failure inside the Codec layer.
Store(StoreError)
Failure inside a UserStore/CredentialStore/RefreshStore
impl.
Refresh(RefreshError)
Failure inside refresh-token rotation — surfaced by cheers-server’s
SessionAuthority::rotate.
Revoked
A token verified cryptographically but its jti is in the revocation
set — surfaced by cheers-verify’s EdgeVerifier.
InvalidInput(String)
Caller passed invalid input that no specific subsystem owns (e.g. an empty subject string, a timestamp outside i64 range).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<CodecError> for Error
impl From<CodecError> for Error
Source§fn from(source: CodecError) -> Self
fn from(source: CodecError) -> Self
Converts to this type from the input type.
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 Error
impl From<StoreError> for Error
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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