Skip to main content

array_parts

Function array_parts 

Source
pub unsafe fn array_parts(array: u64) -> (*const u8, usize)
Expand description

The elements and count of a Swift Array.

An array is one word pointing at _ContiguousArrayStorage: an object header, then the count, the capacity, and finally the elements. Reading it is how a Rust callback sees what SwiftUI handed it — building one with swift_array is only half of the traffic.

§Safety

array must be a Swift Array whose elements have the given stride.