pub struct UrlShortHash(/* private fields */);Expand description
This type contains the first half of a UrlHash instance where a less secure test using a
truncated hash value is acceptable.
Implementations§
Source§impl UrlShortHash
impl UrlShortHash
Sourcepub fn very_short(&self) -> UrlVeryShortHash
pub fn very_short(&self) -> UrlVeryShortHash
Return a UrlVeryShortHash instance containing only the first value of this short hash.
Sourcepub fn starts_with(&self, very_short_hash: &UrlVeryShortHash) -> bool
pub fn starts_with(&self, very_short_hash: &UrlVeryShortHash) -> bool
Does this hash start with the value in the provided very-short hash?
Trait Implementations§
Source§impl Clone for UrlShortHash
impl Clone for UrlShortHash
Source§fn clone(&self) -> UrlShortHash
fn clone(&self) -> UrlShortHash
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for UrlShortHash
Source§impl Debug for UrlShortHash
impl Debug for UrlShortHash
Source§impl Display for UrlShortHash
impl Display for UrlShortHash
impl Eq for UrlShortHash
Source§impl Hash for UrlShortHash
impl Hash for UrlShortHash
Source§impl PartialEq for UrlShortHash
impl PartialEq for UrlShortHash
Source§fn eq(&self, other: &UrlShortHash) -> bool
fn eq(&self, other: &UrlShortHash) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for UrlShortHash
Auto Trait Implementations§
impl Freeze for UrlShortHash
impl RefUnwindSafe for UrlShortHash
impl Send for UrlShortHash
impl Sync for UrlShortHash
impl Unpin for UrlShortHash
impl UnsafeUnpin for UrlShortHash
impl UnwindSafe for UrlShortHash
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