[][src]Struct jws::Error

pub struct Error {
    pub kind: ErrorKind,
    pub message: String,
}

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.

Fields

kind: ErrorKindmessage: String

Methods

impl Error[src]

pub const Other: ErrorKind[src]

pub const MissingHeaderParam: ErrorKind[src]

pub const InvalidHeaderParam: ErrorKind[src]

pub const UnsupportedMacAlgorithm: ErrorKind[src]

pub const InvalidMessage: ErrorKind[src]

pub const InvalidSignature: ErrorKind[src]

pub fn kind(&self) -> ErrorKind[src]

Get the kind of error.

pub fn message(&self) -> &str[src]

Get the error message.

pub fn other(message: impl Into<String>) -> Self[src]

Create a new error of type ErrorKind::Other with a given message.

pub fn missing_header_param(message: impl Into<String>) -> Self[src]

Create a new error of type ErrorKind::MissingHeaderParam with a given message.

pub fn invalid_header_param(message: impl Into<String>) -> Self[src]

Create a new error of type ErrorKind::InvalidHeaderParam with a given message.

pub fn unsupported_mac_algorithm(message: impl Into<String>) -> Self[src]

Create a new error of type ErrorKind::UnsupportedMacAlgorithm with a given message.

pub fn invalid_message(message: impl Into<String>) -> Self[src]

Create a new error of type ErrorKind::InvalidMessage with a given message.

pub fn invalid_signature(message: impl Into<String>) -> Self[src]

Create a new error of type ErrorKind::InvalidSignature with a given message.

Trait Implementations

impl Clone for Error[src]

impl Debug for Error[src]

impl Display 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> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.