The way I like to serialize data in Rust into binary formats is to let a data structure blit itself into a mutable buffer. This is a relatively composable, low level way to work that lends itself to having other abstractions built on top of it. I recently was serializing network packets, so let's make up a small packet format that illustrates how we can do this.
+-------------+-------------+
| Tag (u16) | Count (u16) |
+-------------+-------------+
| |
~ Entry (u32) ~