Crates.io | pathetic |
lib.rs | pathetic |
version | 0.3.0 |
source | src |
created_at | 2020-03-06 22:20:51.45359 |
updated_at | 2020-03-18 19:39:22.625742 |
description | Relative URI library for Rust, based on the `url` crate |
homepage | |
repository | https://github.com/kardeiz/pathetic |
max_upload_size | |
id | 216187 |
size | 9,048 |
A library for working with relative URIs, based on the url
crate.
fn main() {
let uri = pathetic::Uri::default()
.with_path_segments_mut(|p| p.extend(&["foo", "bar"]))
.with_query_pairs_mut(|q| q.append_pair("foo", "bar"))
.with_fragment(Some("baz"));
assert_eq!("/foo/bar?foo=bar#baz", uri.as_str());
}
Current version: 0.3.0
License: MIT