Struct lychee_lib::Uri[][src]

pub struct Uri { /* fields omitted */ }

Lychee’s own representation of a URI, which encapsulates all support formats.

If the scheme is mailto, it’s a mail address. Otherwise it’s treated as a website URL.

Implementations

impl Uri[src]

#[must_use]
pub fn as_str(&self) -> &str
[src]

Returns the string representation of the Uri.

If it’s an email address, returns the string with scheme stripped. Otherwise returns the string as-is.

#[must_use]
pub fn scheme(&self) -> &str
[src]

#[must_use]
pub fn domain(&self) -> Option<&str>
[src]

#[must_use]
pub fn path_segments(&self) -> Option<Split<'_, char>>
[src]

#[must_use]
pub fn host_ip(&self) -> Option<IpAddr>
[src]

Trait Implementations

impl AsRef<str> for Uri[src]

impl Clone for Uri[src]

impl Debug for Uri[src]

impl<'de> Deserialize<'de> for Uri[src]

impl Display for Uri[src]

impl Eq for Uri[src]

impl From<Url> for Uri[src]

impl Hash for Uri[src]

impl Ord for Uri[src]

impl PartialEq<Uri> for Uri[src]

impl PartialOrd<Uri> for Uri[src]

impl Serialize for Uri[src]

impl StructuralEq for Uri[src]

impl StructuralPartialEq for Uri[src]

impl TryFrom<&'_ str> for Uri[src]

type Error = ErrorKind

The type returned in the event of a conversion error.

impl TryFrom<String> for Uri[src]

type Error = ErrorKind

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Uri

impl Send for Uri

impl Sync for Uri

impl Unpin for Uri

impl UnwindSafe for Uri

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,