Improve fs::PathToString documentation

This commit is contained in:
Russell Yanofsky
2021-11-11 09:54:21 -05:00
parent 7f0f853373
commit 9b575f1c73
3 changed files with 34 additions and 21 deletions

View File

@@ -1254,6 +1254,12 @@ A few guidelines for introducing and reviewing new RPC interfaces:
- *Rationale*: User-facing consistency.
- Use `fs::path::u8string()` and `fs::u8path()` functions when converting path
to JSON strings, not `fs::PathToString` and `fs::PathFromString`
- *Rationale*: JSON strings are Unicode strings, not byte strings, and
RFC8259 requires JSON to be encoded as UTF-8.
Internal interface guidelines
-----------------------------