use-query 0.0.1

Small query string utilities for RustUse
Documentation
  • Coverage
  • 80%
    8 out of 10 items documented1 out of 8 items with examples
  • Size
  • Source code size: 7.42 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 337.05 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • RustUse/use-web
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-query

Small query string utilities for RustUse.

Experimental

use-query is experimental while the use-web workspace remains below 0.3.0. Expect small API adjustments during the first release wave.

Example

use use_query::{append_query_param, get_query_param, parse_query};

let params = parse_query("page=2&draft");

assert_eq!(params.len(), 2);
assert_eq!(get_query_param("page=2&draft", "page").as_deref(), Some("2"));
assert_eq!(append_query_param("page=2", "lang", "en"), "page=2&lang=en");

Scope

  • Small parsing and building helpers for query strings.
  • Lookup, removal, and append helpers for common tooling tasks.
  • Graceful handling for repeated, empty, or missing values.

Non-goals

  • Full percent-encoding support.
  • URL parser replacement.

License

Licensed under either of the following, at your option:

  • Apache License, Version 2.0
  • MIT license