pub struct PairedDevice {
pub device_id: [u8; 16],
pub public_key: [u8; 32],
pub x25519_public_key: [u8; 32],
pub encryption_key: [u8; 32],
pub last_synced_seq: u64,
}Expand description
A paired remote device with derived encryption key
Fields§
§device_id: [u8; 16]Remote device ID
public_key: [u8; 32]Remote Ed25519 public key
x25519_public_key: [u8; 32]Remote X25519 public key
encryption_key: [u8; 32]Derived encryption key for this pair
last_synced_seq: u64Last synced sequence number
Implementations§
Source§impl PairedDevice
impl PairedDevice
Sourcepub fn update_last_synced(&mut self, seq: u64)
pub fn update_last_synced(&mut self, seq: u64)
Update the last synced sequence number
Sourcepub fn device_id_hex(&self) -> String
pub fn device_id_hex(&self) -> String
Get device ID as hex string
Trait Implementations§
Source§impl Clone for PairedDevice
impl Clone for PairedDevice
Source§fn clone(&self) -> PairedDevice
fn clone(&self) -> PairedDevice
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PairedDevice
impl Debug for PairedDevice
Source§impl<'de> Deserialize<'de> for PairedDevice
impl<'de> Deserialize<'de> for PairedDevice
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PairedDevice
impl RefUnwindSafe for PairedDevice
impl Send for PairedDevice
impl Sync for PairedDevice
impl Unpin for PairedDevice
impl UnsafeUnpin for PairedDevice
impl UnwindSafe for PairedDevice
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
Mutably borrows from an owned value. Read more