MDB_rel_func

Type Alias MDB_rel_func 

Source
pub 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)>;
Expand description

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

The newptr gives the item’s desired address in the memory map, and oldptr gives its previous address. The item’s actual data resides at the address in item. This callback is expected to walk through the fields of the record in item and modify any values based at the oldptr address to be relative to the newptr address.

§Arguments

  • item (direction in, out) - The item that is to be relocated.
  • oldptr (direction in) - The previous address.
  • newptr (direction in) - The new address to relocate to.
  • relctx (direction in) - An application-provided context, set by #mdb_set_relctx(). This feature is currently unimplemented.

Aliased Type§

pub enum MDB_rel_func {
    None,
    Some(unsafe extern "C" fn(*mut MDB_val, *mut c_void, *mut c_void, *mut c_void)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut MDB_val, *mut c_void, *mut c_void, *mut c_void))

Some value of type T.

Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.