Struct iron::request::Url
[−]
[src]
pub struct Url { pub scheme: String, pub host: Host, pub port: u16, pub path: Vec<String>, pub username: Option<String>, pub password: Option<String>, pub query: Option<String>, pub fragment: Option<String>, }
HTTP/HTTPS URL type for Iron.
Fields
scheme | The lower-cased scheme of the URL, typically "http" or "https". |
host | The host field of the URL, probably a domain. |
port | The connection port. |
path | The URL path, the resource to be accessed. A non-empty vector encoding the parts of the URL path.
Empty entries of |
username | The URL username field, from the userinfo section of the URL.
|
password | The URL password field, from the userinfo section of the URL.
|
query | The URL query string.
|
fragment | The URL fragment.
|
Methods
impl Url
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
.