[−][src]Struct cargo::util::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]
fn clone(&self) -> CanonicalUrl
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CanonicalUrl
[src]
impl Eq for CanonicalUrl
[src]
impl Hash for CanonicalUrl
[src]
fn hash<S: Hasher>(&self, into: &mut S)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for CanonicalUrl
[src]
fn cmp(&self, other: &CanonicalUrl) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<CanonicalUrl> for CanonicalUrl
[src]
fn eq(&self, other: &CanonicalUrl) -> bool
[src]
fn ne(&self, other: &CanonicalUrl) -> bool
[src]
impl PartialOrd<CanonicalUrl> for CanonicalUrl
[src]
fn partial_cmp(&self, other: &CanonicalUrl) -> Option<Ordering>
[src]
fn lt(&self, other: &CanonicalUrl) -> bool
[src]
fn le(&self, other: &CanonicalUrl) -> bool
[src]
fn gt(&self, other: &CanonicalUrl) -> bool
[src]
fn ge(&self, other: &CanonicalUrl) -> bool
[src]
impl StructuralEq for CanonicalUrl
[src]
impl StructuralPartialEq for CanonicalUrl
[src]
Auto Trait Implementations
impl RefUnwindSafe for CanonicalUrl
impl Send for CanonicalUrl
impl Sync for CanonicalUrl
impl Unpin for CanonicalUrl
impl UnwindSafe for CanonicalUrl
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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, 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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,