[][src]Function sled::sled_compare_and_swap

#[no_mangle]pub unsafe extern "C" fn sled_compare_and_swap(
    db: *mut Db,
    key: *const c_char,
    keylen: size_t,
    old_val: *const c_uchar,
    old_vallen: size_t,
    new_val: *const c_uchar,
    new_vallen: size_t,
    actual_val: *mut *const c_uchar,
    actual_vallen: *mut size_t
) -> c_uchar

Compare and swap. Returns 1 if successful, 0 if unsuccessful. Otherwise sets actual_val and actual_vallen to the current value, which must be freed using sled_free_buf by the caller if non-null. actual_val will be null and actual_vallen 0 if the current value is not set.