pub type SetFromSliceFn = unsafe extern "C" fn(set: PtrUninit, elements_ptr: *mut u8, count: usize) -> PtrMut;Expand description
Build a set from a contiguous slice of elements.
This is an optimization for batch construction - instead of calling insert
N times, collect elements in a buffer and build the set in one shot.
ยงSafety
setmust point to uninitialized memory of sufficient size for the set typeelements_ptrmust point tocountconsecutive initialized elements- Each element has size
T::SHAPE.layout.size()(the element stride) - After this call, the elements have been moved into the set and should NOT be dropped