summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2021-01-20 08:15:18 +0100
committerJustus Winter <justus@sequoia-pgp.org>2021-01-20 08:23:44 +0100
commit91b7a8c0299fad67cc32521c4dca8bafc5824a03 (patch)
tree0ca37d2b9efe5947e8b75c427787742c7167f41d
parent962da640699a09d3a1d685a1573f32cd84d516c9 (diff)
autocrypt, ipc: Add missing documentation.
-rw-r--r--autocrypt/src/lib.rs1
-rw-r--r--ipc/src/sexp.rs3
2 files changed, 3 insertions, 1 deletions
diff --git a/autocrypt/src/lib.rs b/autocrypt/src/lib.rs
index fe9abe31..d9a7dfc8 100644
--- a/autocrypt/src/lib.rs
+++ b/autocrypt/src/lib.rs
@@ -182,6 +182,7 @@ impl AutocryptHeader {
None
}
+ /// Writes a serialized version of the object to `o`.
pub fn serialize(&self, o: &mut dyn std::io::Write) -> Result<()> {
if self.key.is_none() {
return Err(Error::InvalidOperation("No key".into()).into());
diff --git a/ipc/src/sexp.rs b/ipc/src/sexp.rs
index 8386a827..771eee18 100644
--- a/ipc/src/sexp.rs
+++ b/ipc/src/sexp.rs
@@ -224,7 +224,7 @@ impl Sexp {
}
}
-
+ /// Writes a serialized version of the object to `o`.
pub fn serialize(&self, o: &mut dyn std::io::Write) -> Result<()> {
match self {
Sexp::String(ref s) => s.serialize(o),
@@ -382,6 +382,7 @@ impl String_ {
self.1.as_ref().map(|b| b.as_ref())
}
+ /// Writes a serialized version of the object to `o`.
pub fn serialize(&self, o: &mut dyn std::io::Write) -> Result<()> {
if let Some(display) = self.display_hint() {
write!(o, "[{}:", display.len())?;