pub fn encode_record(
operation: SyncdOperation,
index: &[u8],
value: &SyncActionValue,
keys: &ExpandedAppStateKeys,
key_id: &[u8],
iv: &[u8; 16],
) -> (SyncdMutation, Vec<u8>)Expand description
Encode and encrypt a mutation into a SyncdRecord.
This is the reverse of decode_record — it takes plaintext data and produces
an encrypted record ready for sending.
§Returns
A tuple of (SyncdMutation, value_mac_bytes) where value_mac is needed for hash state updates and persistence.