Skip to main content

copperlace_ruleset_from_file_with_processors

Function copperlace_ruleset_from_file_with_processors 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn copperlace_ruleset_from_file_with_processors( path: *const c_char, processor_names: *const *const c_char, processor_callbacks: *const Option<CopperlaceProcessorCallback>, processor_user_data: *const *mut c_void, processor_len: usize, out_handle: *mut *mut CopperlaceRuleSet, out_error: *mut *mut c_char, ) -> c_int
Expand description

Loads a configuration file and returns a ruleset handle with custom processors.

ยงSafety

path must point to a valid NUL-terminated UTF-8 string. When processor_len is nonzero, processor_names, processor_callbacks, and processor_user_data must each point to arrays with at least processor_len entries. Processor names must point to valid NUL-terminated UTF-8 strings. 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. Processor callbacks and user data must remain valid until the returned ruleset handle is freed.