pub unsafe extern "C" fn aws_hash_table_init(
    map: *mut aws_hash_table,
    alloc: *mut aws_allocator,
    size: usize,
    hash_fn: aws_hash_fn,
    equals_fn: aws_hash_callback_eq_fn,
    destroy_key_fn: aws_hash_callback_destroy_fn,
    destroy_value_fn: aws_hash_callback_destroy_fn
) -> c_int
Expand description

Initializes a hash map with initial capacity for ‘size’ elements without resizing. Uses hash_fn to compute the hash of each element. equals_fn to compute equality of two keys. Whenever an element is removed without being returned, destroy_key_fn is run on the pointer to the key and destroy_value_fn is run on the pointer to the value. Either or both may be NULL if a callback is not desired in this case.