pub(crate) extern "C" fn handle_metadata(
metadata: *mut readstat_metadata_t,
ctx: *mut c_void,
) -> c_intExpand description
FFI callback that extracts file-level metadata from the ReadStat C parser.
Called once during parsing. Populates the ReadStatMetadata struct
(accessed via the ctx pointer) with row/variable counts, encoding,
timestamps, compression, and endianness.
ยงSafety
metadatamust be a valid pointer to areadstat_metadata_tproduced by the C parser.ctxmust be a valid pointer to aReadStatMetadatainstance that outlives this call.- This function must only be called by the
ReadStatC library as a registered callback.