pub struct KeyDigestComputer { /* private fields */ }Expand description
Cassandra-compatible key digest computer
This struct provides the exact key digest computation algorithm used by Cassandra for partition key hashing in Index.db files.
Implementations§
Source§impl KeyDigestComputer
impl KeyDigestComputer
Sourcepub fn compute_partition_key_digest(
&mut self,
partition_key_bytes: &[u8],
parsing_context: &ParsingContext,
) -> Result<Vec<u8>>
pub fn compute_partition_key_digest( &mut self, partition_key_bytes: &[u8], parsing_context: &ParsingContext, ) -> Result<Vec<u8>>
Compute the partition key digest for Index.db lookup
This method implements the exact Cassandra algorithm:
- Parse the partition key bytes according to schema comparators
- Create byte-comparable encoding for each component
- Combine components into a single byte-comparable key
- Compute Murmur3 hash with seed 0 (Cassandra default)
- Return the hash as little-endian bytes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyDigestComputer
impl RefUnwindSafe for KeyDigestComputer
impl Send for KeyDigestComputer
impl Sync for KeyDigestComputer
impl Unpin for KeyDigestComputer
impl UnsafeUnpin for KeyDigestComputer
impl UnwindSafe for KeyDigestComputer
Blanket Implementations§
impl<T> Allocation for T
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