diff options
| author | Dave Hodder <dmh@dmh.org.uk> | 2013-12-01 12:30:32 +0000 |
|---|---|---|
| committer | Dave Hodder <dmh@dmh.org.uk> | 2013-12-01 12:30:32 +0000 |
| commit | 0515e0541f6fed6e1b50d1b558ffe45625cd4a35 (patch) | |
| tree | aa807567e6a5b38bfb88e3ea502e72bea7da4ac9 /src/libextra | |
| parent | c470184c20167f9f41613d5f4a1d75840e0f5c3a (diff) | |
| download | rust-0515e0541f6fed6e1b50d1b558ffe45625cd4a35.tar.gz rust-0515e0541f6fed6e1b50d1b558ffe45625cd4a35.zip | |
Add struct and type doc comments for extra::url::*
Diffstat (limited to 'src/libextra')
| -rw-r--r-- | src/libextra/url.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libextra/url.rs b/src/libextra/url.rs index cfa4680052d..034d7e110fb 100644 --- a/src/libextra/url.rs +++ b/src/libextra/url.rs @@ -19,23 +19,37 @@ use std::hashmap::HashMap; use std::to_bytes; use std::uint; +/// A Uniform Resource Locator (URL). A URL is a form of URI (Uniform Resource +/// Identifier) that includes network location information, such as hostname or +/// port number. #[deriving(Clone, Eq)] pub struct Url { + /// The scheme part of a URL, such as `http`, `ftp` or `mailto`. scheme: ~str, + /// A URL subcomponent for user authentication. user: Option<UserInfo>, + /// A domain name or IP address. For example, `www.example.com`. host: ~str, + /// A TCP port number, for example `8080`. port: Option<~str>, + /// The path component of a URL, for example `/users/jsmith`. path: ~str, + /// The query component of a URL. query: Query, + /// The fragment component. Does not include the leading hash or pound sign. fragment: Option<~str> } +/// An optional subcomponent of a URI authority component. #[deriving(Clone, Eq)] pub struct UserInfo { + /// The user name. user: ~str, + /// Password or other scheme-specific authentication information. pass: Option<~str> } +/// Represents the query component of a URI. pub type Query = ~[(~str, ~str)]; impl Url { |
