[][src]Enum biscuit::errors::Error

pub enum Error {
    GenericError(String),
    DecodeError(DecodeError),
    ValidationError(ValidationError),
    JsonError(Error),
    DecodeBase64(DecodeError),
    Utf8(Utf8Error),
    IOError(Error),
    KeyRejected(KeyRejected),
    WrongKeyType {
        expected: String,
        actual: String,
    },
    WrongEncryptionOptions {
        expected: String,
        actual: String,
    },
    UnspecifiedCryptographicError,
    UnsupportedOperation,
}

All the errors we can encounter while signing/verifying tokens and a couple of custom one for when the token we are trying to verify is invalid

Variants

GenericError(String)

A generic error which is described by the contained string

DecodeError(DecodeError)

Error returned from failed token decoding

ValidationError(ValidationError)

Error returned from failed token validation

JsonError(Error)

Error during the serialization or deserialization of tokens

DecodeBase64(DecodeError)

Error during base64 encoding or decoding

Utf8(Utf8Error)

Error when decoding bytes to UTF8 string

IOError(Error)

Errors related to IO

KeyRejected(KeyRejected)

Key was rejected by Ring

WrongKeyType

Wrong key type was provided for the cryptographic operation

Fields of WrongKeyType

expected: String

Expected type of key

actual: String

Actual type of key

WrongEncryptionOptions

Wrong variant of EncryptionOptions was provided for the encryption operation

Fields of WrongEncryptionOptions

expected: String

Expected variant of options

actual: String

Actual variant of options

UnspecifiedCryptographicError

An unknown cryptographic error

UnsupportedOperation

An unsupported or invalid operation

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

impl From<DecodeError> for Error[src]

impl From<DecodeError> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<FromUtf8Error> for Error[src]

impl From<KeyRejected> for Error[src]

impl From<String> for Error[src]

impl From<Unspecified> for Error[src]

impl From<Utf8Error> for Error[src]

impl From<ValidationError> for Error[src]

Auto Trait Implementations

impl !RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl !UnwindSafe for Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.