Struct spacetimedb_table::indexes::RowHash
source · 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: u64
Implementations§
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 Ord for RowHash
impl Ord for RowHash
source§impl PartialEq for RowHash
impl PartialEq for RowHash
source§impl PartialOrd for RowHash
impl PartialOrd for RowHash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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