Skip to main content

init

Function init 

Source
pub unsafe fn init(map_base: *mut u8, config: &MapInit)
Expand description

Initialize a new hash map in pre-allocated memory

§Safety

  • map_base must point to valid, properly aligned memory of sufficient size
  • The memory must remain valid for the lifetime of the map

§Panics

Panics if config.capacity is not a power of two