Enum dgc::TrustListFromJsonError[][src]

pub enum TrustListFromJsonError {
Show 15 variants InvalidRootType, KeyIsNotObject(String), MissingPublicKeyAlgorithm(String), InvalidPublicKeyAlgorithm(String), MissingPublicKeyAlgorithmName(String), InvalidPublicKeyAlgorithmName(String), UnsupportedPublicKeyAlgorithmName(StringString), MissingPublicKeyAlgorithmCurve(String), InvalidPublicKeyAlgorithmCurve(String), UnsupportedPublicKeyAlgorithmCurve(StringString), MissingPublicKeyPem(String), InvalidPublicKeyPem(String), PublicKeyPemDecodeError(StringDecodeError), KidBase64DecodeError(StringDecodeError), KeyParseError(StringKeyParseError),
}
Expand description

Error struct that represents all the possible errors that can occur while trying to create a trustlist from a given JSON payload.

Variants

InvalidRootType

The given JSON is not an object

KeyIsNotObject(String)

Tuple Fields

0: String

The given key is not associated to an object

MissingPublicKeyAlgorithm(String)

Tuple Fields

0: String

A given key does not specify a public key algorithm

InvalidPublicKeyAlgorithm(String)

Tuple Fields

0: String

A given key does not specifies the public key algorithm as a string

MissingPublicKeyAlgorithmName(String)

Tuple Fields

0: String

A given key does not specify the name of the public key algorithm

InvalidPublicKeyAlgorithmName(String)

Tuple Fields

0: String

A given key does not specifies the public key algorithm name as a string

UnsupportedPublicKeyAlgorithmName(StringString)

Tuple Fields

0: String
1: String

A given key specifies a public key algorithm name that is not supported

MissingPublicKeyAlgorithmCurve(String)

Tuple Fields

0: String

A given key does not contain ‘publicKeyAlgorithm.namedCurve’

InvalidPublicKeyAlgorithmCurve(String)

Tuple Fields

0: String

A given key does not express ‘publicKeyAlgorithm.namedCurve’ as a string

UnsupportedPublicKeyAlgorithmCurve(StringString)

Tuple Fields

0: String
1: String

A given key is using a ‘publicKeyAlgorithm.namedCurve’ that is not supported

MissingPublicKeyPem(String)

Tuple Fields

0: String

A given key does not contain ‘publicKeyPem’

InvalidPublicKeyPem(String)

Tuple Fields

0: String

A given key does not express ‘publicKeyPem’ as a string

PublicKeyPemDecodeError(StringDecodeError)

Tuple Fields

0: String

A given key have a ‘publicKeyPem’ which cannot be correctly decoded using base64

KidBase64DecodeError(StringDecodeError)

Tuple Fields

0: String

The kid of a given key could not be decoded using base64

KeyParseError(StringKeyParseError)

Tuple Fields

0: String

A given key provided a public key that could not be parsed

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.