feat: string deserialization for prost enums (#2316)

Use pbjson to support string deserialization for enum fields

This allows TOML configs like:
    chainType = "Inbound"
instead of:
    chainType = 1

- Maintain backward compatibility with integer values
- Default serialization format is now string
This commit is contained in:
Luna Yao
2026-06-06 00:21:22 +08:00
committed by GitHub
parent ba653da9a0
commit 9ba364ff60
16 changed files with 182 additions and 139 deletions
+1 -1
View File
@@ -654,7 +654,7 @@ impl PeerConn {
.and_then(|p| p.peer_public_key)
}
async fn send_noise_msg<Msg: prost::Message>(
async fn send_noise_msg<Msg: prost::Message + Debug>(
&self,
pb: Msg,
packet_type: PacketType,