Skip to main content

copperlace_ruleset_from_string

Function copperlace_ruleset_from_string 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn copperlace_ruleset_from_string( config: *const c_char, out_handle: *mut *mut CopperlaceRuleSet, out_error: *mut *mut c_char, ) -> c_int
Expand description

Compiles a configuration string and returns an opaque ruleset handle.

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

ยงSafety

config must point to a valid NUL-terminated UTF-8 string. out_handle must be a valid writable pointer when non-null. out_error must be valid for writing when non-null, and any returned error string must be released with copperlace_string_free.