File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ pub struct URL {
21
21
22
22
pub enum SchemeData {
23
23
RelativeSchemeData (SchemeRelativeURL ),
24
- OtherSchemeData (~str )
24
+ OtherSchemeData (~str ), // data: URLs, mailto: URLs, etc.
25
25
}
26
26
27
27
pub struct SchemeRelativeURL {
@@ -49,6 +49,8 @@ pub struct IPv6Address {
49
49
pub type ParseResult <T > = Result <T , & 'static str >;
50
50
51
51
impl URL {
52
+ // base_url is used to resolve relative URLs.
53
+ // Relative URLs without a base return an error.
52
54
pub fn parse (input : & str , base_url : Option <& URL >) -> ParseResult <URL >
53
55
pub fn serialize (& self ) -> ~str
54
56
pub fn serialize_no_fragment (& self ) -> ~str
@@ -66,6 +68,7 @@ impl IPv6Address {
66
68
67
69
68
70
/// application/x-www-form-urlencoded
71
+ /// Converts between a query string and name/value pairs.
69
72
pub mod form_urlencoded {
70
73
pub fn parse_str (input : & str ) -> ~[(~str , ~str )]
71
74
pub fn parse_bytes (input : & [u8 ], encoding_override : Option <encoding :: EncodingRef >,
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ pub struct URL {
42
42
#[ deriving( Clone ) ]
43
43
pub enum SchemeData {
44
44
RelativeSchemeData ( SchemeRelativeURL ) ,
45
- OtherSchemeData ( ~str )
45
+ OtherSchemeData ( ~str ) , // data: URLs, mailto: URLs, etc.
46
46
}
47
47
48
48
#[ deriving( Clone ) ]
You can’t perform that action at this time.
0 commit comments