| Crates.io | shapely-urlencoded |
| lib.rs | shapely-urlencoded |
| version | 3.1.0 |
| created_at | 2025-03-11 13:39:22.348022+00 |
| updated_at | 2025-03-31 19:08:20.62432+00 |
| description | URL encoded form serialization and deserialization for Shapely types |
| homepage | https://github.com/bearcove/shapely |
| repository | https://github.com/bearcove/shapely |
| max_upload_size | |
| id | 1587946 |
| size | 14,867 |
A serialization and deserialization library for URL encoded form data using the shapely runtime reflection system.
Shapely traituse shapely::Shapely;
use shapely_urlencoded::from_urlencoded;
#[derive(Debug, Shapely, PartialEq)]
struct SearchParams {
query: String,
page: u64,
}
let query_string = "query=rust+programming&page=2";
let mut partial = SearchParams::partial();
from_urlencoded(&mut partial, query_string).expect("Failed to parse URL encoded data");
let params = partial.build::<SearchParams>();
assert_eq!(params, SearchParams { query: "rust programming".to_string(), page: 2 });
Thanks to Namespace for providing fast GitHub Actions workers:
Licensed under either of:
at your option.