pub fn into_pointer<F, P>(function: F) -> *mut c_voidExpand description
Converts a function that returns an Option<NonNull<P>> into a raw C-compatible pointer.
This utility function is used internally to convert Rust’s safe pointer types
into C-compatible raw pointers. Returns null_mut() if the function returns None.
§Type Parameters
F- A function that returnsOption<NonNull<P>>P- The pointer type being converted
§Parameters
Function- The function to execute and convert the result
§Returns
A raw C-compatible pointer, or null if the function returns None