pub struct Error { /* private fields */ }
Expand description
An error that can occur during JWS processing.
An error consists of an ErrorKind
indicating the type of error,
and a human readable message.
The message is purely for human consumption. It should not be used by error handling code to change handling logic.
Implementations
sourceimpl Error
impl Error
pub const Other: ErrorKind = ErrorKind::Other
pub const MissingHeaderParam: ErrorKind = ErrorKind::MissingHeaderParam
pub const InvalidHeaderParam: ErrorKind = ErrorKind::InvalidHeaderParam
pub const UnsupportedMacAlgorithm: ErrorKind = ErrorKind::UnsupportedMacAlgorithm
pub const InvalidMessage: ErrorKind = ErrorKind::InvalidMessage
pub const InvalidSignature: ErrorKind = ErrorKind::InvalidSignature
sourcepub fn other(message: impl Into<String>) -> Self
pub fn other(message: impl Into<String>) -> Self
Create a new error of type ErrorKind::Other
with a given message.
sourcepub fn missing_header_param(message: impl Into<String>) -> Self
pub fn missing_header_param(message: impl Into<String>) -> Self
Create a new error of type ErrorKind::MissingHeaderParam
with a given message.
sourcepub fn invalid_header_param(message: impl Into<String>) -> Self
pub fn invalid_header_param(message: impl Into<String>) -> Self
Create a new error of type ErrorKind::InvalidHeaderParam
with a given message.
sourcepub fn unsupported_mac_algorithm(message: impl Into<String>) -> Self
pub fn unsupported_mac_algorithm(message: impl Into<String>) -> Self
Create a new error of type ErrorKind::UnsupportedMacAlgorithm
with a given message.
sourcepub fn invalid_message(message: impl Into<String>) -> Self
pub fn invalid_message(message: impl Into<String>) -> Self
Create a new error of type ErrorKind::InvalidMessage
with a given message.
sourcepub fn invalid_signature(message: impl Into<String>) -> Self
pub fn invalid_signature(message: impl Into<String>) -> Self
Create a new error of type ErrorKind::InvalidSignature
with a given message.
Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more