[][src]Type Definition lmdb_sys::MDB_rel_func

type MDB_rel_func = Option<unsafe extern "C" fn(item: *mut MDB_val, oldptr: *mut c_void, newptr: *mut c_void, relctx: *mut c_void)>;

@brief A callback function used to relocate a position-dependent data item in a fixed-address database.

The \b newptr gives the item's desired address in the memory map, and \b oldptr gives its previous address. The item's actual data resides at the address in \b item. This callback is expected to walk through the fields of the record in \b item and modify any values based at the \b oldptr address to be relative to the \b newptr address. @param[in,out] item The item that is to be relocated. @param[in] oldptr The previous address. @param[in] newptr The new address to relocate to. @param[in] relctx An application-provided context, set by #mdb_set_relctx(). @todo This feature is currently unimplemented.