pub type MapFromPairSliceFn = unsafe fn(map: PtrUninit, pairs_ptr: *mut u8, count: usize) -> PtrMut;Expand description
Build a map from a contiguous slice of (K, V) pairs.
This is an optimization for JIT deserialization that avoids per-entry vtable calls and rehashing by building the map with known capacity in one shot.
ยงSafety
mapmust point to uninitialized memory of sufficient size for the map.pairs_ptrmust point tocountcontiguous (K, V) tuples, properly aligned.- Keys and values are moved out via
ptr::read- the memory should be deallocated but not dropped afterwards.