2021-02-16 13:37:18 +03:00
|
|
|
use matrix_sdk_common::identifiers::Error as RumaIdentifierError;
|
2021-02-19 18:33:30 +03:00
|
|
|
use matrix_sdk_crypto::{store::CryptoStoreError as InnerStoreError, MegolmError, OlmError};
|
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),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug, thiserror::Error)]
|
|
|
|
pub enum CryptoStoreError {
|
|
|
|
#[error(transparent)]
|
|
|
|
CryptoStore(#[from] InnerStoreError),
|
|
|
|
#[error(transparent)]
|
|
|
|
OlmError(#[from] OlmError),
|
|
|
|
}
|
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),
|
|
|
|
}
|