diff options
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, |