prpc_serde_bytes
prpc_serde_bytes is a Rust procedural macro designed to work with structs that utilize both Serde and Prost crate attributes. Specifically, this macro targets struct fields marked with #[prost(bytes = "vec")] and automatically adds #[serde(with = "as_bytes")] to them, enabling custom serialization behavior as specified.
Usage
Add prpc_serde_bytes as a dependency in your Cargo.toml:
[]
= "0.1.0"
Example
use prpc_serde_bytes;
Which will generate the following code: