Enum ruma_signatures::ParseError [−][src]
#[non_exhaustive] pub enum ParseError { UserId(Error), EventId(Error), ServerNameFromEventIdByRoomVersion(EventId, RoomVersionId), DerivedPublicKeyDoesNotMatchParsedKey { parsed_key: Vec<u8>, derived_key: Vec<u8>, }, Oid { expected: ObjectIdentifier, found: ObjectIdentifier, }, SecretKey(SignatureError), PublicKey(SignatureError), Signature(SignatureError), Base64 { of_type: String, string: String, source: DecodeError, }, }
Expand description
Errors relating to parsing of all sorts.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
For user ID parsing errors.
For event ID parsing errors.
For when an event ID, coupled with a specific room version, doesn’t have a server name embedded.
Tuple Fields of ServerNameFromEventIdByRoomVersion
0: EventId
1: RoomVersionId
For when the extracted/“parsed” public key from a PKCS#8 v2 document doesn’t match the public key derived from it’s private key.
Fields of DerivedPublicKeyDoesNotMatchParsedKey
For when the ASN.1 Object Identifier on a PKCS#8 document doesn’t match the expected one.
e.g. the document describes a RSA key, while an ed25519 key was expected.
Fields of Oid
For when ed25519_dalek
cannot parse a secret/private key.
Tuple Fields of SecretKey
For when ed25519_dalek
cannot parse a public key.
Tuple Fields of PublicKey
For when ed25519_dalek
cannot parse a signature.
Tuple Fields of Signature
For when parsing base64 gives an error.
Fields of Base64
of_type: String
The “type”/name of the base64 string
string: String
The string itself.
source: DecodeError
The originating error.
Trait Implementations
Performs the conversion.