pub struct UrlHash(/* private fields */);Expand description
This type represents a secure, stable, hash value for a Url using an SHA-256 digest
algorithm. While this hash may be tested for equality (and strict inequality) no other
relations, such as ordering, are supported.
Implementations§
Source§impl UrlHash
impl UrlHash
Sourcepub fn short(&self) -> UrlShortHash
pub fn short(&self) -> UrlShortHash
Return a UrlShortHash instance containing the first two values of this hash.
Sourcepub fn very_short(&self) -> UrlVeryShortHash
pub fn very_short(&self) -> UrlVeryShortHash
Return a UrlVeryShortHash instance containing only the first value of this hash.
Sourcepub fn starts_with(&self, short_hash: &UrlShortHash) -> bool
pub fn starts_with(&self, short_hash: &UrlShortHash) -> bool
Does this hash start with the two values in the provided short hash?
Sourcepub fn starts_with_just(&self, very_short_hash: &UrlVeryShortHash) -> bool
pub fn starts_with_just(&self, very_short_hash: &UrlVeryShortHash) -> bool
Does this hash start with the value in the provided very-short hash?
Trait Implementations§
impl Copy for UrlHash
impl Eq for UrlHash
impl StructuralPartialEq for UrlHash
Auto Trait Implementations§
impl Freeze for UrlHash
impl RefUnwindSafe for UrlHash
impl Send for UrlHash
impl Sync for UrlHash
impl Unpin for UrlHash
impl UnsafeUnpin for UrlHash
impl UnwindSafe for UrlHash
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