[−][src]Struct iron::request::Url
HTTP/HTTPS URL type for Iron.
Methods
impl Url
[src]
pub fn parse(input: &str) -> Result<Url, String>
[src]
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.
See: http://url.spec.whatwg.org/#special-scheme
pub fn from_generic_url(raw_url: Url) -> Result<Url, String>
[src]
Create a Url
from a rust-url
Url
.
pub fn into_generic_url(self) -> Url
[src]
use into
from the Into
trait instead
Create a rust-url
Url
from a Url
.
pub fn scheme(&self) -> &str
[src]
The lower-cased scheme of the URL, typically "http" or "https".
pub fn host(&self) -> Host<&str>
[src]
The host field of the URL, probably a domain.
pub fn port(&self) -> u16
[src]
The connection port.
pub fn path(&self) -> Vec<&str>
[src]
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.
pub fn username(&self) -> Option<&str>
[src]
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.
pub fn password(&self) -> Option<&str>
[src]
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.
pub fn query(&self) -> Option<&str>
[src]
The URL query string.
None
if the ?
character was not part of the input.
Otherwise, a possibly empty, percent encoded string.
pub fn fragment(&self) -> Option<&str>
[src]
The URL fragment.
None
if the #
character was not part of the input.
Otherwise, a possibly empty, percent encoded string.
Trait Implementations
impl Into<Url> for Url
[src]
impl Clone for Url
[src]
fn clone(&self) -> Url
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Url> for Url
[src]
impl AsRef<Url> for Url
[src]
impl AsMut<Url> for Url
[src]
impl Eq for Url
[src]
impl Debug for Url
[src]
impl Display for Url
[src]
impl FromStr for Url
[src]
Auto Trait Implementations
impl Sync for Url
impl Unpin for Url
impl Send for Url
impl UnwindSafe for Url
impl RefUnwindSafe for Url
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> DebugAny for T where
T: Any + Debug,
[src]
T: Any + Debug,
impl<T> CloneAny for T where
T: Clone + Any,
[src]
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
[src]
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
[src]
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
[src]
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Send + Sync> where
T: Send + Sync,
[src]
T: Send + Sync,
impl<T> UnsafeAny for T where
T: Any,
T: Any,