#[unsafe(no_mangle)]pub unsafe extern "C" fn pio_to_format(
net: *const PioNetwork,
to: *const c_char,
out_warnings: *mut *mut c_char,
errbuf: *mut c_char,
errlen: usize,
) -> *mut c_charExpand description
Serialize net to the named format to: the one text serializer; every
format is named by a string. Accepts the pio_parse_str names:
matpower is a byte-exact echo when the handle was parsed from MATPOWER.
Also accepts powerio-json as an alias for
pio_to_json. Model JSON cannot represent a non-finite f64 (Inf/NaN):
it writes null, records the field in out_warnings, and fails validation when
read back.
Returns the text as an owned C string (free with pio_string_free),
NULL on error (message into errbuf). Fidelity warnings, if any, are
published through out_warnings as one owned C string (free it with
pio_string_free), or NULL when there are none; a returned string has no
handle to attach them to. Pass NULL to discard them.