Types/fns concerning URLs (see RFC 3986)
Query
of ::std::clone::Clone for Url
- Automatically derived.of ::std::cmp::Eq for Url
- Automatically derived.of ::std::clone::Clone for UserInfo
- Automatically derived.of ::std::cmp::Eq for UserInfo
- Automatically derived.for Url
for UserInfo
of ::std::clone::Clone for Input
- Automatically derived.of ::std::cmp::Eq for Input
- Automatically derived.of FromStr for Url
of ToStr for Url
of IterBytes for Url
decode
- Decode a string encoded with percent encoding.decode_component
- Decode a string encoded with percent encoding.decode_form_urlencoded
- Decode a string encoded with the 'application/x-www-form-urlencoded' media type into a hashmap.encode
- Encodes a URI by replacing reserved characters with percent encoded character sequences.encode_component
- Encodes a URI component by replacing reserved characters with percent encoded character sequences.encode_form_urlencoded
- Encode a hashmap to the 'application/x-www-form-urlencoded' media type.from_str
- Parse a str
to a url
get_scheme
query_to_str
to_str
- Format a url
as a stringQuery
type Query = ~[(~str, ~str)]
::std::clone::Clone
for Url
Automatically derived.
clone
fn clone(&self) -> Url
::std::cmp::Eq
for Url
Automatically derived.
eq
fn eq(&self, __arg_0: &Url) -> ::bool
ne
fn ne(&self, __arg_0: &Url) -> ::bool
::std::clone::Clone
for UserInfo
Automatically derived.
clone
fn clone(&self) -> UserInfo
::std::cmp::Eq
for UserInfo
Automatically derived.
eq
fn eq(&self, __arg_0: &UserInfo) -> ::bool
ne
fn ne(&self, __arg_0: &UserInfo) -> ::bool
Url
new
fn new(scheme: ~str, user: Option<UserInfo>, host: ~str, port: Option<~str>,
path: ~str, query: Query, fragment: Option<~str>) -> Url
UserInfo
new
fn new(user: ~str, pass: Option<~str>) -> UserInfo
::std::clone::Clone
for Input
Automatically derived.
clone
fn clone(&self) -> Input
::std::cmp::Eq
for Input
Automatically derived.
eq
fn eq(&self, __arg_0: &Input) -> ::bool
ne
fn ne(&self, __arg_0: &Input) -> ::bool
FromStr
for Url
from_str
fn from_str(s: &str) -> Option<Url>
ToStr
for Url
to_str
fn to_str(&self) -> ~str
IterBytes
for Url
iter_bytes
fn iter_bytes(&self, lsb0: bool, f: to_bytes::Cb) -> bool
decode
fn decode(s: &str) -> ~str
Decode a string encoded with percent encoding.
This will only decode escape sequences generated by encode.
decode_component
fn decode_component(s: &str) -> ~str
Decode a string encoded with percent encoding.
decode_form_urlencoded
fn decode_form_urlencoded(s: &[u8]) -> HashMap<~str, ~[~str]>
Decode a string encoded with the 'application/x-www-form-urlencoded' media type into a hashmap.
encode
fn encode(s: &str) -> ~str
Encodes a URI by replacing reserved characters with percent encoded character sequences.
This function is compliant with RFC 3986.
encode_component
fn encode_component(s: &str) -> ~str
Encodes a URI component by replacing reserved characters with percent encoded character sequences.
This function is compliant with RFC 3986.
encode_form_urlencoded
fn encode_form_urlencoded(m: &HashMap<~str, ~[~str]>) -> ~str
Encode a hashmap to the 'application/x-www-form-urlencoded' media type.
from_str
fn from_str(rawurl: &str) -> Result<Url, ~str>
Parse a str
to a url
rawurl
- a string representing a full url, including scheme.
a url
that contains the parsed representation of the url.
get_scheme
fn get_scheme(rawurl: &str) -> Result<(~str, ~str), ~str>
query_to_str
fn query_to_str(query: &Query) -> ~str
to_str
fn to_str(url: &Url) -> ~str
Format a url
as a string
url
- a url.
a str
that contains the formatted url. Note that this will usually be an inverse of from_str
but might strip out unneeded separators. for example, "http://somehost.com?", when parsed and formatted, will result in just "http://somehost.com".