QueryParams Derive
Rust custom derive to automatically implement serialization to http query params for arbitrary structs. A simple #[derive(QueryParams)]
will generate a function to_query_params
for your struct.
How it Works
extern crate query_params;
Get Started
It's as simple as two steps:
- Add
query_params
to yourCargo.toml
-
manually
-
or with cargo-edit:
cargo add derive_builder
- Annotate your struct with
#[derive(QueryParams)]
Disclaimer :exclamation:
- Tuple structs and unit structs are not supported as they have no field names.
Documentation
Detailed explaination of all features and tips for troubleshooting.
Contribution
Feel free to make a pull request :smiley: