hash_const

Function hash_const 

Source
pub const fn hash_const(s: &str) -> u64
Expand description

Compile-time version of the hash function

While not directly usable as a string literal suffix like in C++, this can be used in const contexts.

§Arguments

  • s - The string to hash

§Returns

The 64-bit hash value