impl_core_build_hasher!() { /* proc-macro */ }
Expand description

Implement core::Hash::BuildHasher for types that already implement BuildHasher<u64>.

// Implements `::core::Hash:BuildHasher` for `MyType`.
impl_core_build_hasher!(MyType);

You can pass multiple types as arguments. Types are separated by ;.

// Implements `::core::Hash:BuildHasher` for `MyOtherType<u32>` and `MyOtherType<u64>`.
impl_core_build_hasher!(MyOtherType<u32>; MyOtherType<u64>);

You can also pass generic types using the impl keyword.

// Implements `::core::Hash:BuildHasher` for `MyType` and `MyOtherType`.
impl_core_build_hasher! {
    impl<T> MyType<T>;
    impl<'a, T, U: 'a> MyOtherType<'a, T, u32, U> where Self: Display;
}