2021-03-30 15:28:53 +03:00
|
|
|
use matrix_sdk_crypto::{
|
|
|
|
store::CryptoStoreError as InnerStoreError, KeyExportError, MegolmError, OlmError,
|
|
|
|
};
|
2021-05-07 20:36:37 +03:00
|
|
|
use ruma::identifiers::Error as RumaIdentifierError;
|
2021-02-16 13:37:18 +03:00
|
|
|
|
|
|
|
#[derive(Debug, thiserror::Error)]
|
|
|
|
pub enum MachineCreationError {
|
|
|
|
#[error(transparent)]
|
|
|
|
Identifier(#[from] RumaIdentifierError),
|
|
|
|
#[error(transparent)]
|
|
|
|
CryptoStore(#[from] InnerStoreError),
|
|
|
|
}
|
|
|
|
|
2021-03-30 15:28:53 +03:00
|
|
|
#[derive(Debug, thiserror::Error)]
|
|
|
|
pub enum KeyImportError {
|
|
|
|
#[error(transparent)]
|
|
|
|
Export(#[from] KeyExportError),
|
|
|
|
#[error(transparent)]
|
|
|
|
CryptoStore(#[from] InnerStoreError),
|
|
|
|
}
|
|
|
|
|
2021-02-16 13:37:18 +03:00
|
|
|
#[derive(Debug, thiserror::Error)]
|
|
|
|
pub enum CryptoStoreError {
|
|
|
|
#[error(transparent)]
|
|
|
|
CryptoStore(#[from] InnerStoreError),
|
|
|
|
#[error(transparent)]
|
|
|
|
OlmError(#[from] OlmError),
|
2021-03-29 17:36:40 +03:00
|
|
|
#[error(transparent)]
|
|
|
|
Serialization(#[from] serde_json::Error),
|
2021-04-12 16:03:28 +03:00
|
|
|
#[error(transparent)]
|
|
|
|
Identifier(#[from] RumaIdentifierError),
|
2021-02-16 13:37:18 +03:00
|
|
|
}
|
2021-02-19 18:33:30 +03:00
|
|
|
|
|
|
|
#[derive(Debug, thiserror::Error)]
|
|
|
|
pub enum DecryptionError {
|
|
|
|
#[error(transparent)]
|
|
|
|
Serialization(#[from] serde_json::Error),
|
|
|
|
#[error(transparent)]
|
|
|
|
Identifier(#[from] RumaIdentifierError),
|
|
|
|
#[error(transparent)]
|
|
|
|
Megolm(#[from] MegolmError),
|
|
|
|
}
|