#[non_exhaustive]pub enum Error {
Show 17 variants
InvalidModuleHash,
InvalidModuleFormat,
Utf8Error(Utf8Error),
IoError(Error),
ParserReadError(BinaryReaderError),
ParseError(String),
Other(String),
Token,
Json(Error),
Base64(DecodeError),
Sign(Error),
Utf8(String),
TokenTooEarly,
ExpiredToken,
MissingIssuer,
MissingSubject,
InvalidAlgorithm,
}Expand description
Wick WasCap’s error type.
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.
InvalidModuleHash
Error returned when a module’s hash does not match the hash embedded in its token.
InvalidModuleFormat
Error returned when we could not find the module’s JWT section
Utf8Error(Utf8Error)
Error parsing string.
IoError(Error)
Error reading a buffer.
ParserReadError(BinaryReaderError)
Error reading a buffer.
ParseError(String)
Error injecting token into WebAssembly module.
Other(String)
General error.
Token
Invalid token format
Json(Error)
Error parsing JSON
Base64(DecodeError)
Error decoding base64
Sign(Error)
Error signing token
Utf8(String)
Error decoding utf8 bytes
TokenTooEarly
Token is not yet valid
ExpiredToken
Token has expired
MissingIssuer
Token is missing an issuer
MissingSubject
Token is missing a subject
InvalidAlgorithm
Token uses an invalid algorithm
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<BinaryReaderError> for Error
impl From<BinaryReaderError> for Error
Source§fn from(source: BinaryReaderError) -> Self
fn from(source: BinaryReaderError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe 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