pub trait MatchEventHandler<'a> {
    unsafe fn split(&mut self) -> (ch_match_event_handler, *mut c_void);
}
Expand description

Definition of the match event callback function type.

A callback function matching the defined type must be provided by the application calling the DatabaseRef::scan

This callback function will be invoked whenever a match is located in the target data during the execution of a scan. The details of the match are passed in as parameters to the callback function, and the callback function should return a value indicating whether or not matching should continue on the target data. If no callbacks are desired from a scan call, NULL may be provided in order to suppress match production.

Required Methods

Split the match event handler to callback and userdata.

Safety

The returned function can only be called with the returned pointer, or a pointer to another C closure.

Implementations on Foreign Types

Implementors