pub trait MassMapHashLoader {
type BuildHasher: BuildHasher;
// Required method
fn load(config: &MassMapHashConfig) -> Result<Self::BuildHasher>;
}Expand description
Trait for loading a hash function configuration for use in a massmap.
Implement this trait to provide custom hash function support for massmaps.
Implementors should ensure that the returned BuildHasher is constructed according to the
provided MassMapHashConfig. The name field in the config should match the hash function
supported by the implementation. This trait is intended for users who wish to plug in their own
hash functions or parameterizations.
Required Associated Types§
type BuildHasher: BuildHasher
Required Methods§
Sourcefn load(config: &MassMapHashConfig) -> Result<Self::BuildHasher>
fn load(config: &MassMapHashConfig) -> Result<Self::BuildHasher>
Loads a hash function from the given configuration.
§Parameters
config: The hash function configuration to load. Thenamefield must match the supported hash function, and theparametersfield must contain all required parameters.
§Returns
Returns a BuildHasher instance configured as specified.
§Errors
Returns an error if the name does not match the supported hash function, or if required
parameters are missing or invalid.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.