diff options
author | Alex Auvolat <alex@adnab.me> | 2020-12-02 20:12:24 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-12-02 20:12:24 +0100 |
commit | 14d34e76f4007e50af89bd47f6ad36f45494c50a (patch) | |
tree | d1a79d397b26f9500917ef5e4eaa6ae70b2d1429 /src/util.rs | |
parent | 46fae5d138cb7c0a74e2a8c7837541f18400ccf4 (diff) | |
download | netapp-14d34e76f4007e50af89bd47f6ad36f45494c50a.tar.gz netapp-14d34e76f4007e50af89bd47f6ad36f45494c50a.zip |
Documentate
Diffstat (limited to 'src/util.rs')
-rw-r--r-- | src/util.rs | 6 |
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, |