1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rocksdb_column_family_descriptors_t {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rocksdb_fulloptions_t {
pub db_opts: *mut rocksdb_options_t,
pub cf_descs: *mut rocksdb_column_family_descriptors_t,
}
#[test]
fn bindgen_test_layout_rocksdb_fulloptions_t() {
assert_eq!(
::std::mem::size_of::<rocksdb_fulloptions_t>(),
16usize,
concat!("Size of: ", stringify!(rocksdb_fulloptions_t))
);
assert_eq!(
::std::mem::align_of::<rocksdb_fulloptions_t>(),
8usize,
concat!("Alignment of ", stringify!(rocksdb_fulloptions_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rocksdb_fulloptions_t>())).db_opts as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rocksdb_fulloptions_t),
"::",
stringify!(db_opts)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rocksdb_fulloptions_t>())).cf_descs as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(rocksdb_fulloptions_t),
"::",
stringify!(cf_descs)
)
);
}
extern "C" {
pub fn rocksdb_null_cache() -> *mut rocksdb_cache_t;
}
extern "C" {
pub fn rocksdb_options_clone(options: *mut rocksdb_options_t) -> *mut rocksdb_options_t;
}
extern "C" {
pub fn rocksdb_column_family_descriptors_create() -> *mut rocksdb_column_family_descriptors_t;
}
extern "C" {
pub fn rocksdb_column_family_descriptors_destroy(
cf_descs: *mut rocksdb_column_family_descriptors_t,
);
}
extern "C" {
pub fn rocksdb_column_family_descriptors_count(
cf_descs: *const rocksdb_column_family_descriptors_t,
) -> libc::c_int;
}
extern "C" {
pub fn rocksdb_column_family_descriptors_name(
cf_descs: *const rocksdb_column_family_descriptors_t,
index: libc::c_int,
) -> *mut libc::c_char;
}
extern "C" {
pub fn rocksdb_column_family_descriptors_options(
cf_descs: *const rocksdb_column_family_descriptors_t,
index: libc::c_int,
) -> *mut rocksdb_options_t;
}
extern "C" {
pub fn rocksdb_options_load_from_file(
config_file: *const libc::c_char,
env: *mut rocksdb_env_t,
ignore_unknown_options: bool,
cache: *mut rocksdb_cache_t,
errptr: *mut *mut libc::c_char,
) -> rocksdb_fulloptions_t;
}