pub struct RowHash(pub u64);Expand description
The content hash of a row.
Notes:
-
The hash is not cryptographically secure.
-
The hash is valid only for the lifetime of a
Table. This entails that it should not be persisted to disk or used as a stable identifier over the network. For example, the hashing algorithm could be different on different machines based on availability of hardware instructions. Moreover, due to random seeds, when restarting from disk, the hashes may be different for the same rows.
Tuple Fields§
§0: u64Implementations§
Source§impl RowHash
impl RowHash
Sourcepub fn hasher_builder() -> RandomState
pub fn hasher_builder() -> RandomState
Returns a Hasher builder that yields the type of hashes that RowHash stores.
Trait Implementations§
Source§impl MemoryUsage for RowHash
impl MemoryUsage for RowHash
Source§fn heap_usage(&self) -> usize
fn heap_usage(&self) -> usize
The heap memory usage of this type. The default implementation returns 0.
Source§impl Ord for RowHash
impl Ord for RowHash
Source§impl PartialOrd for RowHash
impl PartialOrd for RowHash
impl Copy for RowHash
impl Eq for RowHash
impl StructuralPartialEq for RowHash
impl IsEnabled for RowHash
RowHash is already a hash, so no need to hash again.
Auto Trait Implementations§
impl Freeze for RowHash
impl RefUnwindSafe for RowHash
impl Send for RowHash
impl Sync for RowHash
impl Unpin for RowHash
impl UnwindSafe for RowHash
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more