pub enum BBError {
NetworkError(String),
TokenInvalid(String),
URLInvalid(String),
Fatal(String),
JSONError(String),
JWKInvalid(String),
DecodeError(String),
ClaimInvalid(String),
SignatureInvalid,
Other(String),
Unknown,
}
Expand description
Errors used in bbjwt
Variants§
NetworkError(String)
Some network communication failed.
TokenInvalid(String)
Token has invalid format.
URLInvalid(String)
URL is invalid.
Fatal(String)
A fatal error, we cannot continue.
JSONError(String)
JSON related error.
JWKInvalid(String)
JWK contains invalid data
DecodeError(String)
Decoding (base64) failed.
ClaimInvalid(String)
A claim did not validate/contained the wrong value.
SignatureInvalid
The signature could not be verified.
Other(String)
Some other error.
Unknown
Something went wrong for an unknown reason; should never be used :-)
Implementations§
Trait Implementations§
source§impl Error for BBError
impl Error for BBError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<DecodeError> for BBError
impl From<DecodeError> for BBError
source§fn from(err: DecodeError) -> Self
fn from(err: DecodeError) -> Self
Converts to this type from the input type.
source§impl PartialEq for BBError
impl PartialEq for BBError
impl Eq for BBError
impl StructuralPartialEq for BBError
Auto Trait Implementations§
impl RefUnwindSafe for BBError
impl Send for BBError
impl Sync for BBError
impl Unpin for BBError
impl UnwindSafe for BBError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.