Type Definition sentry_contrib_native_sys::EventFunction[][src]

type EventFunction = extern "C" fn(event: Value, hint: *mut c_void, closure: *mut c_void) -> Value;

Type of the before_send callback.

The callback takes ownership of the event, and should usually return that same event. In case the event should be discarded, the callback needs to call sentry_value_decref on the provided event, and return a sentry_value_new_null() instead.

This function may be invoked inside of a signal handler and must be safe for that purpose, see https://man7.org/linux/man-pages/man7/signal-safety.7.html. On Windows, it may be called from inside of a UnhandledExceptionFilter, see the documentation on SEH (structured exception handling) for more information https://docs.microsoft.com/en-us/windows/win32/debug/structured-exception-handling