Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
给定结构:
#[derive(Debug, Serialize)] pub struct ReqMetrics { start: Timespec, pub name: String }
如何确保 Serdestart在序列化时忽略该字段?
start
正确的注释是#[serde(skip_serializing)]。
#[serde(skip_serializing)]