Rust-Chinese-Translation/api-guidelines

interoperability Serde 部分翻译错误

zjp-CN opened this issue · 1 comments

改正后:

LinkedHashMap and IpAddr are data structures. It would be completely reasonable for somebody to want to read in a LinkedHashMap or IpAddr from a JSON file, or send one over IPC to another process.

LinkedHashMap 和 IpAddr 是数据结构, 从 JSON 中读取 LinkedHashMap / IpAddr , 或者通过 IPC 发送其中一种数据到另一个进程 都十分合理。


the #rust or #serde IRC channels can help assess more ambiguous cases if necessary.
If a crate does not already depend on Serde for other reasons, it may wish to gate Serde impls behind a Cargo cfg. This way downstream libraries only need to pay the cost of compiling Serde if they need those impls to exist.

而 #rust 和 #serde IRC 通信就是很让这种界限模糊的情况得到良好的处理。 如果某个 crate 因为某些原因还没有把 Serde 作为依赖,那么它可能希望把 Serde 相关的 impls 块放在 Cargo cfg 后面用作条件编译。从而下游的库需要这些 Serde impls 的时候, 就编译 Serde ,不需要的时候不编译 Serde 。