Skip to main content

create_hashes_with_hasher

Function create_hashes_with_hasher 

Source
pub fn create_hashes_with_hasher<'a, I, T, S>(
    arrays: I,
    hash_builder: &S,
    hashes_buffer: &'a mut [u64],
) -> Result<&'a mut [u64]>
where I: IntoIterator<Item = T>, T: AsDynArray, S: BuildHasher,
Expand description

Creates hash values for every row using a caller-provided hash builder.

The number of rows to hash is determined by hashes_buffer.len(). hashes_buffer should be pre-sized appropriately.

ยงHash compatibility

Hash values are not guaranteed to be bit-for-bit identical to those from create_hashes, even when hash_builder also implements HashState. The optimized HashState path seeds the hasher from the previous hash when rehashing some primitive and byte-view values, whereas this function combines independently computed hashes. Use one API consistently if hashes are persisted or exchanged.