DoxigAlpha

hashArray

Helper function to hash a set of contiguous objects, from an array or slice.

Function parameters

Parameters

#
hasher:anytype
key:anytype

Describes how pointer types should be hashed.

Types

#
HashStrategy
Describes how pointer types should be hashed.

Helper function to hash a pointer and mutate the strategy if needed.

Functions

#
hashPointer
Helper function to hash a pointer and mutate the strategy if needed.
hashArray
Helper function to hash a set of contiguous objects, from an array or slice.
hash
Provides generic hashing for any eligible type.
autoHash
Provides generic hashing for any eligible type.

Source

Implementation

#
pub fn hashArray(hasher: anytype, key: anytype, comptime strat: HashStrategy) void {
    for (key) |element| {
        hash(hasher, element, strat);
    }
}