Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Compress and Decompress Files in Rust
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Please refer to Rust Crates - Compression Related for details. It is suggested that you use the Rust crate zstd as Zstandard is the best compression/decompression algorithm currently. For more discussions …
Hands on the Glob Crate in Rust
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Run Shell Command in Rust
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Send and Sync in Rust
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Tips and Traps¶
Send
andSync
are 2 thread-safty related marker traits in Rust.A type is
Send
if and only if it can be transferred across thread boundaries. A type isSync
if and only if&T
Handle Duplicated Keys in serde_yaml in Rust
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Tips and Traps¶
The YAML specification does not forbid duplicated keys.
serde-yaml
ignores duplicated keys except the last one silently, by default. To overwrite this behavior, you have to define your own struct and use the tag serde_with::rust::maps_duplicate_key_is_error