File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -19,23 +19,37 @@ use std::hashmap::HashMap;
19
19
use std:: to_bytes;
20
20
use std:: uint;
21
21
22
+ /// A Uniform Resource Locator (URL). A URL is a form of URI (Uniform Resource
23
+ /// Identifier) that includes network location information, such as hostname or
24
+ /// port number.
22
25
#[ deriving( Clone , Eq ) ]
23
26
pub struct Url {
27
+ /// The scheme part of a URL, such as `http`, `ftp` or `mailto`.
24
28
scheme : ~str ,
29
+ /// A URL subcomponent for user authentication.
25
30
user : Option < UserInfo > ,
31
+ /// A domain name or IP address. For example, `www.example.com`.
26
32
host : ~str ,
33
+ /// A TCP port number, for example `8080`.
27
34
port : Option < ~str > ,
35
+ /// The path component of a URL, for example `/users/jsmith`.
28
36
path : ~str ,
37
+ /// The query component of a URL.
29
38
query : Query ,
39
+ /// The fragment component. Does not include the leading hash or pound sign.
30
40
fragment : Option < ~str >
31
41
}
32
42
43
+ /// An optional subcomponent of a URI authority component.
33
44
#[ deriving( Clone , Eq ) ]
34
45
pub struct UserInfo {
46
+ /// The user name.
35
47
user : ~str ,
48
+ /// Password or other scheme-specific authentication information.
36
49
pass : Option < ~str >
37
50
}
38
51
52
+ /// Represents the query component of a URI.
39
53
pub type Query = ~[ ( ~str , ~str ) ] ;
40
54
41
55
impl Url {
You can’t perform that action at this time.
0 commit comments