crypto: Add some more serialize/deserialize implementations

master
Damir Jelić 2021-01-18 13:21:30 +01:00
parent 14575892bd
commit 5418c88775
2 changed files with 3 additions and 3 deletions

View File

@ -361,7 +361,7 @@ impl<'a> IntoIterator for &'a SelfSigningPubkey {
} }
/// Enum over the different user identity types we can have. /// Enum over the different user identity types we can have.
#[derive(Debug, Clone)] #[derive(Debug, Clone, Serialize, Deserialize)]
pub enum UserIdentities { pub enum UserIdentities {
/// Our own user identity. /// Our own user identity.
Own(OwnUserIdentity), Own(OwnUserIdentity),
@ -567,7 +567,7 @@ impl UserIdentity {
/// ///
/// This identity can verify other identities as well as devices belonging to /// This identity can verify other identities as well as devices belonging to
/// the identity. /// the identity.
#[derive(Debug, Clone)] #[derive(Debug, Clone, Serialize, Deserialize)]
pub struct OwnUserIdentity { pub struct OwnUserIdentity {
user_id: Arc<UserId>, user_id: Arc<UserId>,
master_key: MasterPubkey, master_key: MasterPubkey,

View File

@ -100,7 +100,7 @@ pub struct OlmDecryptionInfo {
/// A hash of a succesfully decrypted Olm message. /// A hash of a succesfully decrypted Olm message.
/// ///
/// Can be used to check if a message has been replayed to us. /// Can be used to check if a message has been replayed to us.
#[derive(Debug, Clone)] #[derive(Debug, Clone, Serialize, Deserialize)]
pub struct OlmMessageHash { pub struct OlmMessageHash {
/// The curve25519 key of the sender that sent us the Olm message. /// The curve25519 key of the sender that sent us the Olm message.
pub sender_key: String, pub sender_key: String,