Crate miniurl [−] [src]
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);
Structs
Url |
url object |