Skip to main content

copperlace_ruleset_render

Function copperlace_ruleset_render 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn copperlace_ruleset_render( handle: *const CopperlaceRuleSet, rule: *const c_char, out_string: *mut *mut c_char, out_error: *mut *mut c_char, ) -> c_int
Expand description

Renders a named rule from a ruleset handle.

On success, writes an owned UTF-8 string to out_string and returns COPPERLACE_OK. On failure, writes null to out_string, writes an owned error string to out_error when provided, and returns a nonzero status code. Returned output and error strings must be released with copperlace_string_free.

ยงSafety

handle must be a live ruleset handle returned by Copperlace. rule must point to a valid NUL-terminated UTF-8 string. out_string and out_error must be valid for writing when non-null. Any returned output or error string must be released with copperlace_string_free.