Implement custom fmt::Debug for some prost_build generated structs

Currently implemented for:
1. common.Ipv4Addr
2. common.Ipv6Addr
3. common.UUID
This commit is contained in:
liusen373
2025-06-21 11:24:35 +08:00
committed by Sijie.Sun
parent e1bfec6fe2
commit 95e4e5a931
2 changed files with 29 additions and 8 deletions

View File

@@ -170,7 +170,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.type_attribute("common.RpcDescriptor", "#[derive(Hash, Eq)]")
.field_attribute(".web.NetworkConfig", "#[serde(default)]")
.service_generator(Box::new(rpc_build::ServiceGenerator::new()))
.btree_map(["."]);
.btree_map(["."])
.skip_debug(&[".common.Ipv4Addr", ".common.Ipv6Addr", ".common.UUID"]);
config.compile_protos(&proto_files, &["src/proto/"])?;