Type Alias lmdb_master_sys::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§

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: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 8 bytes

Size for each variant:

  • None: 0 bytes
  • Some: 8 bytes