uri_rs/
lib.rs

1//! # Usage
2//!
3//! ```rust
4//! use uri_rs::Uri;
5//! let s = "http://user1:pass1@localhost:8080/example?key1=value1&key2=value2&key1=value2#f1";
6//! let uri = Uri::parse(s).unwrap();
7//! println!("{:?}", uri);
8//! // Uri {
9//! //    schema: Scheme("http"),
10//! //    authority: Some(
11//! //      Authority {
12//! //        host_name: HostName("localhost"),
13//! //        port: Some(8080),
14//! //        user_info: Some(
15//! //          UserInfo {
16//! //            user_name: "user1",
17//! //            password: Some("pass1")
18//! //          }
19//! //        )
20//! //      }
21//! //    ),
22//! //    path: AbemptyPath {
23//! //      type_name: "abempty_path",
24//! //      parts: ["example"]
25//! //    },
26//! //    query: Some(
27//! //      Query {
28//! //        params: [
29//! //          ("key1", Some("value1")),
30//! //          ("key2", Some("value2")),
31//! //          ("key1", Some("value2"))
32//! //        ]
33//! //      }
34//! //    ),
35//! //    fragment: Some("f1")
36//! // }
37//! println!("{}", uri.to_string());
38//! // http://user1:pass1@localhost:8080/example?key1=value1&key2=value2&key1=value2#f1
39//! ```
40pub use ast::authority::*;
41pub use ast::path::*;
42pub use ast::query::*;
43pub use ast::scheme::*;
44pub use ast::user_info::*;
45pub use ast::uri::*;
46pub use ast::*;
47
48mod ast;
49pub mod parser;
50#[cfg(feature = "serde")]
51mod serde;