pub struct CanonicalUrl(/* private fields */);Expand description
A wrapper around SafeUrl which represents a “canonical” version of an original URL.
A “canonical” URL is only intended for internal comparison purposes. 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. All fetching should happen within the context of the original URL, since canonicalization can remove credentials and change paths.
Implementations§
Trait Implementations§
Source§impl CacheKey for CanonicalUrl
impl CacheKey for CanonicalUrl
fn cache_key(&self, state: &mut CacheKeyHasher)
fn cache_key_slice(data: &[Self], state: &mut CacheKeyHasher)where
Self: Sized,
Source§impl Clone for CanonicalUrl
impl Clone for CanonicalUrl
Source§impl Debug for CanonicalUrl
impl Debug for CanonicalUrl
Source§impl Display for CanonicalUrl
impl Display for CanonicalUrl
impl Eq for CanonicalUrl
Source§impl From<CanonicalUrl> for SafeUrl
impl From<CanonicalUrl> for SafeUrl
Source§fn from(value: CanonicalUrl) -> Self
fn from(value: CanonicalUrl) -> Self
Converts to this type from the input type.
Source§impl Hash for CanonicalUrl
impl Hash for CanonicalUrl
Source§impl Ord for CanonicalUrl
impl Ord for CanonicalUrl
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for CanonicalUrl
impl PartialEq for CanonicalUrl
Source§impl PartialOrd for CanonicalUrl
impl PartialOrd for CanonicalUrl
impl StructuralPartialEq for CanonicalUrl
Auto Trait Implementations§
impl Freeze for CanonicalUrl
impl RefUnwindSafe for CanonicalUrl
impl Send for CanonicalUrl
impl Sync for CanonicalUrl
impl Unpin for CanonicalUrl
impl UnsafeUnpin for CanonicalUrl
impl UnwindSafe for CanonicalUrl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more