Skip to content

Commit 0515e05

Browse files
committed
Add struct and type doc comments for extra::url::*
1 parent c470184 commit 0515e05

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/libextra/url.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,37 @@ use std::hashmap::HashMap;
1919
use std::to_bytes;
2020
use std::uint;
2121

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.
2225
#[deriving(Clone, Eq)]
2326
pub struct Url {
27+
/// The scheme part of a URL, such as `http`, `ftp` or `mailto`.
2428
scheme: ~str,
29+
/// A URL subcomponent for user authentication.
2530
user: Option<UserInfo>,
31+
/// A domain name or IP address. For example, `www.example.com`.
2632
host: ~str,
33+
/// A TCP port number, for example `8080`.
2734
port: Option<~str>,
35+
/// The path component of a URL, for example `/users/jsmith`.
2836
path: ~str,
37+
/// The query component of a URL.
2938
query: Query,
39+
/// The fragment component. Does not include the leading hash or pound sign.
3040
fragment: Option<~str>
3141
}
3242

43+
/// An optional subcomponent of a URI authority component.
3344
#[deriving(Clone, Eq)]
3445
pub struct UserInfo {
46+
/// The user name.
3547
user: ~str,
48+
/// Password or other scheme-specific authentication information.
3649
pass: Option<~str>
3750
}
3851

52+
/// Represents the query component of a URI.
3953
pub type Query = ~[(~str, ~str)];
4054

4155
impl Url {

0 commit comments

Comments
 (0)