#url #object #miniurl

miniurl

miniurl is a url parser lib for rust

4 releases

Uses old Rust 2015

0.1.3 Aug 17, 2017
0.1.2 Aug 13, 2017
0.1.1 Aug 13, 2017
0.1.0 Aug 12, 2017

#382 in #object

Download history 7/week @ 2025-01-15 57/week @ 2025-02-12 37/week @ 2025-02-19 79/week @ 2025-02-26 24/week @ 2025-03-05 81/week @ 2025-03-12 17/week @ 2025-03-19 20/week @ 2025-03-26 10/week @ 2025-04-02 15/week @ 2025-04-09 12/week @ 2025-04-16

59 downloads per month
Used in 2 crates

MIT/Apache

10KB
172 lines

miniurl is url parser lib for rust,is simple and easy.

Examples

use miniurl::Url;

let url = Url::parse("http://admin:password@google.com/foo?a=1&b=2#top");
assert_eq!(url.scheme, "http");
assert_eq!(url.netloc, "admin:password@google.com");
assert_eq!(url.path, "/foo");
assert_eq!(url.query, Some("a=1&b=2".to_string()));
assert_eq!(url.fragment, Some("top".to_string()));
assert_eq!(url.username, Some("admin".to_string()));
assert_eq!(url.password, Some("password".to_string()));
assert_eq!(url.host, Some("google.com".to_string()));
assert_eq!(url.port, 80);

No runtime deps