Type Definition hyperscan_sys::chimera::ch_error_event_handler
source · [−]pub type ch_error_event_handler = Option<unsafe extern "C" fn(error_type: ch_error_event_t, id: c_uint, info: *mut c_void, ctx: *mut c_void) -> ch_callback_t>;
Expand description
Definition of the Chimera error event callback function type.
A callback function matching the defined type may be provided by the application calling the @ref ch_scan function. This callback function will be invoked when an error event occurs during matching; this indicates that some matches for a given expression may not be reported.
@param error_type The type of error event that occurred. Currently these errors correspond to resource limits on PCRE backtracking @ref CH_ERROR_MATCHLIMIT and @ref CH_ERROR_RECURSIONLIMIT.
@param id The ID number of the expression that matched.
@param info Event-specific data, for future use. Currently unused.
@param ctx The context pointer supplied by the user to the @ref ch_scan function.
@return The callback can return @ref CH_CALLBACK_SKIP_PATTERN to cease matching this pattern but continue matching the next pattern. Otherwise, we stop matching for all patterns with @ref CH_CALLBACK_TERMINATE.