qs-rs

Crates.ioqs-rs
lib.rsqs-rs
version0.1.4
sourcesrc
created_at2021-06-23 02:22:33.88042
updated_at2021-12-08 02:44:25.345168
descriptionconvert to query string
homepage
repositoryhttps://gitee.com/turbidsoul/qs-rs
max_upload_size
id413734
size20,072
Turbidsoul (turbidsoul)

documentation

README

qs-rs

let x = 1;
let s = stringify!(
    "a" => x,
    "b" => 2,
    "c" => 3,
    "d" => "name age"
);
assert_eq!(s,  "a=1&b=2&c=3&d=name+age");
let mut m = BTreeMap::new();
m.insert("a", 1);
m.insert("b", 2);
m.insert("c", 3);
let s = stringify!(m);
assert_eq!(s,  "a=1&b=2&c=3");
let s = stringify![
    ("a", 1),
    ("b", 2),
    ("c", 3)
];
assert_eq!(s,  "a=1&b=2&c=3");
Commit count: 0

cargo fmt