[][src]Struct cargo::util::CanonicalUrl

pub struct CanonicalUrl(_);

A newtype wrapper around Url which represents a "canonical" version of an original URL.

A "canonical" url is only intended for internal comparison purposes in Cargo. It's to help paper over mistakes such as depending on github.com/foo/bar vs github.com/foo/bar.git. This is only for internal purposes within Cargo and provides no means to actually read the underlying string value of the Url it contains. This is intentional, because all fetching should still happen within the context of the original URL.

Implementations

impl CanonicalUrl[src]

pub fn new(url: &Url) -> CargoResult<CanonicalUrl>[src]

pub fn raw_canonicalized_url(&self) -> &Url[src]

Returns the raw canonicalized URL, although beware that this should never be used/displayed/etc, it should only be used for internal data structures and hashes and such.

Trait Implementations

impl Clone for CanonicalUrl[src]

impl Debug for CanonicalUrl[src]

impl Eq for CanonicalUrl[src]

impl Hash for CanonicalUrl[src]

impl Ord for CanonicalUrl[src]

impl PartialEq<CanonicalUrl> for CanonicalUrl[src]

impl PartialOrd<CanonicalUrl> for CanonicalUrl[src]

impl StructuralEq for CanonicalUrl[src]

impl StructuralPartialEq for CanonicalUrl[src]

Auto Trait Implementations

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> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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>,