Struct iron::request::Url
[−]
[src]
pub struct Url { // some fields omitted }
HTTP/HTTPS URL type for Iron.
Methods
impl Url
[src]
fn parse(input: &str) -> Result<Url, String>
Create a URL from a string.
The input must be a valid URL with a special scheme for this to succeed.
HTTP and HTTPS are special schemes.
fn from_generic_url(raw_url: Url) -> Result<Url, String>
Create a Url
from a rust-url
Url
.
fn into_generic_url(self) -> Url
Create a rust-url
Url
from a Url
.
fn scheme(&self) -> &str
The lower-cased scheme of the URL, typically "http" or "https".
fn host(&self) -> Host<&str>
The host field of the URL, probably a domain.
fn port(&self) -> u16
The connection port.
fn path(&self) -> Vec<&str>
The URL path, the resource to be accessed.
A non-empty vector encoding the parts of the URL path.
Empty entries of ""
correspond to trailing slashes.
fn username(&self) -> Option<&str>
The URL username field, from the userinfo section of the URL.
None
if the @
character was not part of the input OR
if a blank username was provided.
Otherwise, a non-empty string.
fn password(&self) -> Option<&str>
The URL password field, from the userinfo section of the URL.
None
if the @
character was not part of the input OR
if a blank password was provided.
Otherwise, a non-empty string.
fn query(&self) -> Option<&str>
The URL query string.
None
if the ?
character was not part of the input.
Otherwise, a possibly empty, percent encoded string.
fn fragment(&self) -> Option<&str>
The URL fragment.
None
if the #
character was not part of the input.
Otherwise, a possibly empty, percent encoded string.
Trait Implementations
impl Debug for Url
[src]
impl Clone for Url
[src]
fn clone(&self) -> Url
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Eq for Url
[src]
impl PartialEq for Url
[src]
fn eq(&self, __arg_0: &Url) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Url) -> bool
This method tests for !=
.