# Callback Functions

> Callback functions are user-defined functions the are registered with the eXtremeDB runtime which will then call the registered function when the appropriate condition occurs. Please use the links below to view descriptions of the various callback functions:

> mco_error_handler
> Called by the runtime (if registered) when a fatal error occurs
> mco_error_handler_ex
> Called by the runtime (if registered) when a fatal error occurs
> mco_stream_writer
> Called by the runtime if specified in an API such as `mco_db_save()`
> mco_stream_reader
> Called by the runtime if specified in an API such as `mco_db_load()`
> mco_trans_iterator_callback
> Transaction Iterator callback function used by API `mco_trans_iterate()`
> mco_calc_handlers
> Database Calculator Callback Handlers
> mco_sniffer_callback
> Called by the `mco_db_sniffer()` API
> mco_alloc_callback
> Dynamic memory allocation callback
> mco_alloc_callback_threshold_kind_t
> Required for calls to `mco_register_alloc_callback()` or `mco_register_disk_alloc_callback()`
> mco_collation_funcs_t
> Collation functions structure
> mco_compare_collation
> Collation compare function
> mco_hash_collation
> Collation hash function
> mco_trans_callback
> Сalled when a transaction is committed or rolled back