pub enum SignatureError {
UnsupportedAlgorithm,
InvalidKeyId(IdParseError),
MissingSigningKey,
UserIdMismatch,
NotAnObject,
NoSignatureFound,
VerificationError(SignatureError),
InvalidKey(KeyError),
InvalidSignature,
SigningKeyChanged(Option<Box<Ed25519PublicKey>>, Option<Box<Ed25519PublicKey>>),
JsonError(CanonicalJsonError),
StoreError(CryptoStoreError),
}
Expand description
Error type describing different errors that happen when we check or create signatures for a Matrix JSON object.
Variants§
UnsupportedAlgorithm
The signature was made using an unsupported algorithm.
InvalidKeyId(IdParseError)
The ID of the signing key isn’t a valid key ID.
MissingSigningKey
The signing key that should create or check a signature is missing.
UserIdMismatch
The user id of signing key differs from the user id that provided the signature.
NotAnObject
The provided JSON value that was signed and the signature should be checked isn’t a valid JSON object.
NoSignatureFound
The provided JSON value that was signed and the signature should be checked isn’t a valid JSON object.
VerificationError(SignatureError)
The signature couldn’t be verified.
InvalidKey(KeyError)
The public key isn’t a valid ed25519 key.
InvalidSignature
The signature could not be decoded.
SigningKeyChanged(Option<Box<Ed25519PublicKey>>, Option<Box<Ed25519PublicKey>>)
The signing key that used to sign the object has been changed.
JsonError(CanonicalJsonError)
The signed object couldn’t be deserialized.
StoreError(CryptoStoreError)
The store ran into an error.
Trait Implementations§
source§impl Debug for SignatureError
impl Debug for SignatureError
source§impl Display for SignatureError
impl Display for SignatureError
source§impl Error for SignatureError
impl Error for SignatureError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<CanonicalJsonError> for SignatureError
impl From<CanonicalJsonError> for SignatureError
source§fn from(source: CanonicalJsonError) -> Self
fn from(source: CanonicalJsonError) -> Self
source§impl From<CryptoStoreError> for SignatureError
impl From<CryptoStoreError> for SignatureError
source§fn from(source: CryptoStoreError) -> Self
fn from(source: CryptoStoreError) -> Self
source§impl From<Error> for SignatureError
impl From<Error> for SignatureError
source§fn from(e: SerdeError) -> Self
fn from(e: SerdeError) -> Self
source§impl From<Error> for SignatureError
impl From<Error> for SignatureError
source§fn from(source: IdParseError) -> Self
fn from(source: IdParseError) -> Self
source§impl From<KeyError> for SignatureError
impl From<KeyError> for SignatureError
source§impl From<SignatureError> for DehydrationError
impl From<SignatureError> for DehydrationError
source§fn from(source: SignatureError) -> Self
fn from(source: SignatureError) -> Self
source§impl From<SignatureError> for SessionCreationError
impl From<SignatureError> for SessionCreationError
source§fn from(source: SignatureError) -> Self
fn from(source: SignatureError) -> Self
source§impl From<SignatureError> for SignatureError
impl From<SignatureError> for SignatureError
source§fn from(source: SignatureError) -> Self
fn from(source: SignatureError) -> Self
Auto Trait Implementations§
impl Freeze for SignatureError
impl !RefUnwindSafe for SignatureError
impl Send for SignatureError
impl Sync for SignatureError
impl Unpin for SignatureError
impl !UnwindSafe for SignatureError
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
source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more