Skip to main content

swift_array

Function swift_array 

Source
pub unsafe fn swift_array(
    elem_meta: *const c_void,
    count: usize,
    bytes: &[u8],
) -> u64
Expand description

Build a Swift.Array of count elements from raw bytes laid out at the element type’s stride.

§Safety

elem_meta must be type metadata, and bytes must hold count initialised values of it laid out at its stride. The array takes ownership of what is copied in, so those values must be +1.