mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 02:02:52 +00:00
600ad38ff8
- Remove trailing ::{self} on all use statements - Remove any resulting single-level use statements (e.g. use libc;) - Reformat with `tools/fmt --nightly` BUG=b:239937122 TEST=tools/dev_container tools/presubmit --all Change-Id: I8afd1b0458ca6d08d9b41a24583f7d4148597ccb Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3798973 Auto-Submit: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Dennis Kempin <denniskempin@google.com> Tested-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Dennis Kempin <denniskempin@google.com> |
||
---|---|---|
.. | ||
serde_keyvalue_derive | ||
src | ||
Cargo.toml | ||
README.md |
Serde deserializer from key=value strings
A lightweight serde deserializer for strings containing key-value pairs separated by commas, as commonly found in command-line parameters.
Say your program takes a command-line option of the form:
--foo type=bar,active,nb_threads=8
This crate provides a from_key_values
function that deserializes these key-values into a
configuration structure. Since it uses serde, the same configuration structure can also be created
from any other supported source (such as a TOML or YAML configuration file) that uses the same keys.
Integration with the argh command-line parser is also provided via
the argh_derive
feature.
See the inline documentation for examples and more details.