aboutsummaryrefslogtreecommitdiff
path: root/src/util.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-12-02 20:12:24 +0100
committerAlex Auvolat <alex@adnab.me>2020-12-02 20:12:24 +0100
commit14d34e76f4007e50af89bd47f6ad36f45494c50a (patch)
treed1a79d397b26f9500917ef5e4eaa6ae70b2d1429 /src/util.rs
parent46fae5d138cb7c0a74e2a8c7837541f18400ccf4 (diff)
downloadnetapp-14d34e76f4007e50af89bd47f6ad36f45494c50a.tar.gz
netapp-14d34e76f4007e50af89bd47f6ad36f45494c50a.zip
Documentate
Diffstat (limited to 'src/util.rs')
-rw-r--r--src/util.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util.rs b/src/util.rs
index e83822e..f09a3bc 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -1,6 +1,10 @@
use serde::Serialize;
-// util
+/// Utility function: encodes any serializable value in MessagePack binary format
+/// using the RMP library.
+///
+/// Field names and variant names are included in the serialization.
+/// This is used internally by the netapp communication protocol.
pub fn rmp_to_vec_all_named<T>(val: &T) -> Result<Vec<u8>, rmp_serde::encode::Error>
where
T: Serialize + ?Sized,