Something like this:
struct cmp
{
hash: *fn(_:*void) u64,
eq : *fn(_:*void, _:*void) bool,
free: *fn(_:*void) void
}
With maybe some default options should be enough for at least the basics.
Note that the indirection overhead would be significant, but without generics or something similar, you don't really have a choice.