Derive Clone on all types
This commit is contained in:
parent
146ff74995
commit
7e1dbcc26e
@ -19,7 +19,7 @@ const PRIVATE_KEY_LENGTH: usize = 32;
|
||||
const PUBLIC_KEY_LENGTH: usize = 32;
|
||||
const SIGNATURE_LENGTH: usize = 64;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct KeyPair {
|
||||
public_key: [u8; PUBLIC_KEY_LENGTH],
|
||||
private_key: [u8; PRIVATE_KEY_LENGTH],
|
||||
|
||||
@ -13,7 +13,7 @@ use sha2::{digest::Digest, Sha512};
|
||||
use std::fmt;
|
||||
use subtle::ConstantTimeEq;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct DisplayableFingerprint {
|
||||
local: String,
|
||||
remote: String,
|
||||
@ -65,7 +65,7 @@ impl DisplayableFingerprint {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ScannableFingerprint {
|
||||
version: u32,
|
||||
local_fingerprint: Vec<u8>,
|
||||
@ -142,7 +142,7 @@ impl ScannableFingerprint {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Fingerprint {
|
||||
pub display: DisplayableFingerprint,
|
||||
pub scannable: ScannableFingerprint,
|
||||
|
||||
@ -44,7 +44,7 @@ impl SenderKeyName {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SenderMessageKey {
|
||||
iteration: u32,
|
||||
iv: Vec<u8>,
|
||||
|
||||
@ -11,7 +11,7 @@ use crate::IdentityKey;
|
||||
use crate::error::{Result, SignalProtocolError};
|
||||
use crate::state::{PreKeyId, SignedPreKeyId};
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct PreKeyBundle {
|
||||
registration_id: u32,
|
||||
device_id: u32,
|
||||
|
||||
@ -19,7 +19,7 @@ use prost::Message;
|
||||
use std::collections::VecDeque;
|
||||
use std::iter::FromIterator;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct UnacknowledgedPreKeyMessageItems {
|
||||
pre_key_id: Option<u32>,
|
||||
signed_pre_key_id: u32,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user