Skip to main content

Module ffi

Module ffi 

Source

Structs§

CopperlaceProcessorResult
Opaque C ABI result handle passed to custom processor callbacks.
CopperlaceRuleSet
Opaque C ABI handle for a compiled Copperlace ruleset.

Constants§

COPPERLACE_INVALID_ARGUMENT
Status code for invalid C ABI arguments such as null required pointers.
COPPERLACE_OK
Status code for a successful C ABI call.
COPPERLACE_PARSE_ERROR
Status code for config loading, parsing, or compilation failures.
COPPERLACE_RENDER_ERROR
Status code for rule rendering failures.

Functions§

copperlace_processor_result_set_error
Sets the error for a custom processor callback result.
copperlace_processor_result_set_output
Sets the output for a custom processor callback result.
copperlace_ruleset_free
Releases a ruleset handle returned by the C ABI.
copperlace_ruleset_from_file
Loads a configuration file and returns an opaque ruleset handle.
copperlace_ruleset_from_file_with_processors
Loads a configuration file and returns a ruleset handle with custom processors.
copperlace_ruleset_from_string
Compiles a configuration string and returns an opaque ruleset handle.
copperlace_ruleset_from_string_with_processors
Compiles a configuration string and returns a ruleset handle with custom processors.
copperlace_ruleset_render
Renders a named rule from a ruleset handle.
copperlace_ruleset_render_inferred
Renders a named rule, inferring formatted structured JSON for object-valued rules.
copperlace_ruleset_render_inferred_with_context
Renders a named rule with initial context, inferring formatted structured JSON for object-valued rules.
copperlace_ruleset_render_structured_json
Renders a named structured rule from a ruleset handle as JSON text.
copperlace_ruleset_render_structured_json_with_context
Renders a named structured rule from a ruleset handle with initial context.
copperlace_ruleset_render_with_context
Renders a named rule from a ruleset handle with initial context values.
copperlace_string_free
Releases a string returned by the C ABI.

Type Aliases§

CopperlaceProcessorCallback
Host callback used by custom C ABI processors.