From 99d073f22cc9c007dcf297c5c80af14b375d6038 Mon Sep 17 00:00:00 2001 From: Devon Hudson Date: Tue, 3 Sep 2024 12:37:52 -0600 Subject: [PATCH] Add docs for additional pickle functions --- src/pk_encryption.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pk_encryption.rs b/src/pk_encryption.rs index 734a8ec3..a25d57c2 100644 --- a/src/pk_encryption.rs +++ b/src/pk_encryption.rs @@ -236,6 +236,7 @@ impl Default for PkDecryption { } } +/// Attempt to decode a [`PkDecryption`] object from a [`PkDecryptionPickle`] object. impl TryFrom for PkDecryption { type Error = crate::LibolmPickleError; @@ -247,6 +248,7 @@ impl TryFrom for PkDecryption { } } +/// A libolm compatible and picklable form of [`PkDecryption`]. #[derive(Encode, Decode, Zeroize, ZeroizeOnDrop)] struct PkDecryptionPickle { version: u32, @@ -255,6 +257,7 @@ struct PkDecryptionPickle { } impl From<&PkDecryption> for PkDecryptionPickle { + /// Create a new [`PkDecryptionPickle`] object from a [`PkDecryption`] object. fn from(decrypt: &PkDecryption) -> Self { Self { version: PICKLE_VERSION,