bindings_posix.rs (191962B)
1 /* automatically generated by rust-bindgen 0.69.5 */ 2 3 #[repr(C)] 4 #[derive(Default)] 5 pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]); 6 impl<T> __IncompleteArrayField<T> { 7 #[inline] 8 pub const fn new() -> Self { 9 __IncompleteArrayField(::std::marker::PhantomData, []) 10 } 11 #[inline] 12 pub fn as_ptr(&self) -> *const T { 13 self as *const _ as *const T 14 } 15 #[inline] 16 pub fn as_mut_ptr(&mut self) -> *mut T { 17 self as *mut _ as *mut T 18 } 19 #[inline] 20 pub unsafe fn as_slice(&self, len: usize) -> &[T] { 21 ::std::slice::from_raw_parts(self.as_ptr(), len) 22 } 23 #[inline] 24 pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { 25 ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len) 26 } 27 } 28 impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> { 29 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { 30 fmt.write_str("__IncompleteArrayField") 31 } 32 } 33 pub const _INTTYPES_H: u32 = 1; 34 pub const _FEATURES_H: u32 = 1; 35 pub const _DEFAULT_SOURCE: u32 = 1; 36 pub const __GLIBC_USE_ISOC23: u32 = 0; 37 pub const __USE_ISOC11: u32 = 1; 38 pub const __USE_ISOC99: u32 = 1; 39 pub const __USE_ISOC95: u32 = 1; 40 pub const __USE_POSIX_IMPLICITLY: u32 = 1; 41 pub const _POSIX_SOURCE: u32 = 1; 42 pub const _POSIX_C_SOURCE: u32 = 200809; 43 pub const __USE_POSIX: u32 = 1; 44 pub const __USE_POSIX2: u32 = 1; 45 pub const __USE_POSIX199309: u32 = 1; 46 pub const __USE_POSIX199506: u32 = 1; 47 pub const __USE_XOPEN2K: u32 = 1; 48 pub const __USE_XOPEN2K8: u32 = 1; 49 pub const _ATFILE_SOURCE: u32 = 1; 50 pub const __WORDSIZE: u32 = 64; 51 pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; 52 pub const __SYSCALL_WORDSIZE: u32 = 64; 53 pub const __TIMESIZE: u32 = 64; 54 pub const __USE_TIME_BITS64: u32 = 1; 55 pub const __USE_MISC: u32 = 1; 56 pub const __USE_ATFILE: u32 = 1; 57 pub const __USE_FORTIFY_LEVEL: u32 = 0; 58 pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0; 59 pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0; 60 pub const __GLIBC_USE_C23_STRTOL: u32 = 0; 61 pub const _STDC_PREDEF_H: u32 = 1; 62 pub const __STDC_IEC_559__: u32 = 1; 63 pub const __STDC_IEC_60559_BFP__: u32 = 201404; 64 pub const __STDC_IEC_559_COMPLEX__: u32 = 1; 65 pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404; 66 pub const __STDC_ISO_10646__: u32 = 201706; 67 pub const __GNU_LIBRARY__: u32 = 6; 68 pub const __GLIBC__: u32 = 2; 69 pub const __GLIBC_MINOR__: u32 = 40; 70 pub const _SYS_CDEFS_H: u32 = 1; 71 pub const __glibc_c99_flexarr_available: u32 = 1; 72 pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0; 73 pub const __HAVE_GENERIC_SELECTION: u32 = 1; 74 pub const _STDINT_H: u32 = 1; 75 pub const __GLIBC_USE_LIB_EXT2: u32 = 0; 76 pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0; 77 pub const __GLIBC_USE_IEC_60559_BFP_EXT_C23: u32 = 0; 78 pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0; 79 pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0; 80 pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C23: u32 = 0; 81 pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0; 82 pub const _BITS_TYPES_H: u32 = 1; 83 pub const _BITS_TYPESIZES_H: u32 = 1; 84 pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; 85 pub const __INO_T_MATCHES_INO64_T: u32 = 1; 86 pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; 87 pub const __STATFS_MATCHES_STATFS64: u32 = 1; 88 pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1; 89 pub const __FD_SETSIZE: u32 = 1024; 90 pub const _BITS_TIME64_H: u32 = 1; 91 pub const _BITS_WCHAR_H: u32 = 1; 92 pub const _BITS_STDINT_INTN_H: u32 = 1; 93 pub const _BITS_STDINT_UINTN_H: u32 = 1; 94 pub const _BITS_STDINT_LEAST_H: u32 = 1; 95 pub const INT8_MIN: i32 = -128; 96 pub const INT16_MIN: i32 = -32768; 97 pub const INT32_MIN: i32 = -2147483648; 98 pub const INT8_MAX: u32 = 127; 99 pub const INT16_MAX: u32 = 32767; 100 pub const INT32_MAX: u32 = 2147483647; 101 pub const UINT8_MAX: u32 = 255; 102 pub const UINT16_MAX: u32 = 65535; 103 pub const UINT32_MAX: u32 = 4294967295; 104 pub const INT_LEAST8_MIN: i32 = -128; 105 pub const INT_LEAST16_MIN: i32 = -32768; 106 pub const INT_LEAST32_MIN: i32 = -2147483648; 107 pub const INT_LEAST8_MAX: u32 = 127; 108 pub const INT_LEAST16_MAX: u32 = 32767; 109 pub const INT_LEAST32_MAX: u32 = 2147483647; 110 pub const UINT_LEAST8_MAX: u32 = 255; 111 pub const UINT_LEAST16_MAX: u32 = 65535; 112 pub const UINT_LEAST32_MAX: u32 = 4294967295; 113 pub const INT_FAST8_MIN: i32 = -128; 114 pub const INT_FAST16_MIN: i64 = -9223372036854775808; 115 pub const INT_FAST32_MIN: i64 = -9223372036854775808; 116 pub const INT_FAST8_MAX: u32 = 127; 117 pub const INT_FAST16_MAX: u64 = 9223372036854775807; 118 pub const INT_FAST32_MAX: u64 = 9223372036854775807; 119 pub const UINT_FAST8_MAX: u32 = 255; 120 pub const UINT_FAST16_MAX: i32 = -1; 121 pub const UINT_FAST32_MAX: i32 = -1; 122 pub const INTPTR_MIN: i64 = -9223372036854775808; 123 pub const INTPTR_MAX: u64 = 9223372036854775807; 124 pub const UINTPTR_MAX: i32 = -1; 125 pub const PTRDIFF_MIN: i64 = -9223372036854775808; 126 pub const PTRDIFF_MAX: u64 = 9223372036854775807; 127 pub const SIG_ATOMIC_MIN: i32 = -2147483648; 128 pub const SIG_ATOMIC_MAX: u32 = 2147483647; 129 pub const SIZE_MAX: i32 = -1; 130 pub const WINT_MIN: u32 = 0; 131 pub const WINT_MAX: u32 = 4294967295; 132 pub const ____gwchar_t_defined: u32 = 1; 133 pub const __PRI64_PREFIX: &[u8; 2] = b"l\0"; 134 pub const __PRIPTR_PREFIX: &[u8; 2] = b"l\0"; 135 pub const PRId8: &[u8; 2] = b"d\0"; 136 pub const PRId16: &[u8; 2] = b"d\0"; 137 pub const PRId32: &[u8; 2] = b"d\0"; 138 pub const PRId64: &[u8; 3] = b"ld\0"; 139 pub const PRIdLEAST8: &[u8; 2] = b"d\0"; 140 pub const PRIdLEAST16: &[u8; 2] = b"d\0"; 141 pub const PRIdLEAST32: &[u8; 2] = b"d\0"; 142 pub const PRIdLEAST64: &[u8; 3] = b"ld\0"; 143 pub const PRIdFAST8: &[u8; 2] = b"d\0"; 144 pub const PRIdFAST16: &[u8; 3] = b"ld\0"; 145 pub const PRIdFAST32: &[u8; 3] = b"ld\0"; 146 pub const PRIdFAST64: &[u8; 3] = b"ld\0"; 147 pub const PRIi8: &[u8; 2] = b"i\0"; 148 pub const PRIi16: &[u8; 2] = b"i\0"; 149 pub const PRIi32: &[u8; 2] = b"i\0"; 150 pub const PRIi64: &[u8; 3] = b"li\0"; 151 pub const PRIiLEAST8: &[u8; 2] = b"i\0"; 152 pub const PRIiLEAST16: &[u8; 2] = b"i\0"; 153 pub const PRIiLEAST32: &[u8; 2] = b"i\0"; 154 pub const PRIiLEAST64: &[u8; 3] = b"li\0"; 155 pub const PRIiFAST8: &[u8; 2] = b"i\0"; 156 pub const PRIiFAST16: &[u8; 3] = b"li\0"; 157 pub const PRIiFAST32: &[u8; 3] = b"li\0"; 158 pub const PRIiFAST64: &[u8; 3] = b"li\0"; 159 pub const PRIo8: &[u8; 2] = b"o\0"; 160 pub const PRIo16: &[u8; 2] = b"o\0"; 161 pub const PRIo32: &[u8; 2] = b"o\0"; 162 pub const PRIo64: &[u8; 3] = b"lo\0"; 163 pub const PRIoLEAST8: &[u8; 2] = b"o\0"; 164 pub const PRIoLEAST16: &[u8; 2] = b"o\0"; 165 pub const PRIoLEAST32: &[u8; 2] = b"o\0"; 166 pub const PRIoLEAST64: &[u8; 3] = b"lo\0"; 167 pub const PRIoFAST8: &[u8; 2] = b"o\0"; 168 pub const PRIoFAST16: &[u8; 3] = b"lo\0"; 169 pub const PRIoFAST32: &[u8; 3] = b"lo\0"; 170 pub const PRIoFAST64: &[u8; 3] = b"lo\0"; 171 pub const PRIu8: &[u8; 2] = b"u\0"; 172 pub const PRIu16: &[u8; 2] = b"u\0"; 173 pub const PRIu32: &[u8; 2] = b"u\0"; 174 pub const PRIu64: &[u8; 3] = b"lu\0"; 175 pub const PRIuLEAST8: &[u8; 2] = b"u\0"; 176 pub const PRIuLEAST16: &[u8; 2] = b"u\0"; 177 pub const PRIuLEAST32: &[u8; 2] = b"u\0"; 178 pub const PRIuLEAST64: &[u8; 3] = b"lu\0"; 179 pub const PRIuFAST8: &[u8; 2] = b"u\0"; 180 pub const PRIuFAST16: &[u8; 3] = b"lu\0"; 181 pub const PRIuFAST32: &[u8; 3] = b"lu\0"; 182 pub const PRIuFAST64: &[u8; 3] = b"lu\0"; 183 pub const PRIx8: &[u8; 2] = b"x\0"; 184 pub const PRIx16: &[u8; 2] = b"x\0"; 185 pub const PRIx32: &[u8; 2] = b"x\0"; 186 pub const PRIx64: &[u8; 3] = b"lx\0"; 187 pub const PRIxLEAST8: &[u8; 2] = b"x\0"; 188 pub const PRIxLEAST16: &[u8; 2] = b"x\0"; 189 pub const PRIxLEAST32: &[u8; 2] = b"x\0"; 190 pub const PRIxLEAST64: &[u8; 3] = b"lx\0"; 191 pub const PRIxFAST8: &[u8; 2] = b"x\0"; 192 pub const PRIxFAST16: &[u8; 3] = b"lx\0"; 193 pub const PRIxFAST32: &[u8; 3] = b"lx\0"; 194 pub const PRIxFAST64: &[u8; 3] = b"lx\0"; 195 pub const PRIX8: &[u8; 2] = b"X\0"; 196 pub const PRIX16: &[u8; 2] = b"X\0"; 197 pub const PRIX32: &[u8; 2] = b"X\0"; 198 pub const PRIX64: &[u8; 3] = b"lX\0"; 199 pub const PRIXLEAST8: &[u8; 2] = b"X\0"; 200 pub const PRIXLEAST16: &[u8; 2] = b"X\0"; 201 pub const PRIXLEAST32: &[u8; 2] = b"X\0"; 202 pub const PRIXLEAST64: &[u8; 3] = b"lX\0"; 203 pub const PRIXFAST8: &[u8; 2] = b"X\0"; 204 pub const PRIXFAST16: &[u8; 3] = b"lX\0"; 205 pub const PRIXFAST32: &[u8; 3] = b"lX\0"; 206 pub const PRIXFAST64: &[u8; 3] = b"lX\0"; 207 pub const PRIdMAX: &[u8; 3] = b"ld\0"; 208 pub const PRIiMAX: &[u8; 3] = b"li\0"; 209 pub const PRIoMAX: &[u8; 3] = b"lo\0"; 210 pub const PRIuMAX: &[u8; 3] = b"lu\0"; 211 pub const PRIxMAX: &[u8; 3] = b"lx\0"; 212 pub const PRIXMAX: &[u8; 3] = b"lX\0"; 213 pub const PRIdPTR: &[u8; 3] = b"ld\0"; 214 pub const PRIiPTR: &[u8; 3] = b"li\0"; 215 pub const PRIoPTR: &[u8; 3] = b"lo\0"; 216 pub const PRIuPTR: &[u8; 3] = b"lu\0"; 217 pub const PRIxPTR: &[u8; 3] = b"lx\0"; 218 pub const PRIXPTR: &[u8; 3] = b"lX\0"; 219 pub const SCNd8: &[u8; 4] = b"hhd\0"; 220 pub const SCNd16: &[u8; 3] = b"hd\0"; 221 pub const SCNd32: &[u8; 2] = b"d\0"; 222 pub const SCNd64: &[u8; 3] = b"ld\0"; 223 pub const SCNdLEAST8: &[u8; 4] = b"hhd\0"; 224 pub const SCNdLEAST16: &[u8; 3] = b"hd\0"; 225 pub const SCNdLEAST32: &[u8; 2] = b"d\0"; 226 pub const SCNdLEAST64: &[u8; 3] = b"ld\0"; 227 pub const SCNdFAST8: &[u8; 4] = b"hhd\0"; 228 pub const SCNdFAST16: &[u8; 3] = b"ld\0"; 229 pub const SCNdFAST32: &[u8; 3] = b"ld\0"; 230 pub const SCNdFAST64: &[u8; 3] = b"ld\0"; 231 pub const SCNi8: &[u8; 4] = b"hhi\0"; 232 pub const SCNi16: &[u8; 3] = b"hi\0"; 233 pub const SCNi32: &[u8; 2] = b"i\0"; 234 pub const SCNi64: &[u8; 3] = b"li\0"; 235 pub const SCNiLEAST8: &[u8; 4] = b"hhi\0"; 236 pub const SCNiLEAST16: &[u8; 3] = b"hi\0"; 237 pub const SCNiLEAST32: &[u8; 2] = b"i\0"; 238 pub const SCNiLEAST64: &[u8; 3] = b"li\0"; 239 pub const SCNiFAST8: &[u8; 4] = b"hhi\0"; 240 pub const SCNiFAST16: &[u8; 3] = b"li\0"; 241 pub const SCNiFAST32: &[u8; 3] = b"li\0"; 242 pub const SCNiFAST64: &[u8; 3] = b"li\0"; 243 pub const SCNu8: &[u8; 4] = b"hhu\0"; 244 pub const SCNu16: &[u8; 3] = b"hu\0"; 245 pub const SCNu32: &[u8; 2] = b"u\0"; 246 pub const SCNu64: &[u8; 3] = b"lu\0"; 247 pub const SCNuLEAST8: &[u8; 4] = b"hhu\0"; 248 pub const SCNuLEAST16: &[u8; 3] = b"hu\0"; 249 pub const SCNuLEAST32: &[u8; 2] = b"u\0"; 250 pub const SCNuLEAST64: &[u8; 3] = b"lu\0"; 251 pub const SCNuFAST8: &[u8; 4] = b"hhu\0"; 252 pub const SCNuFAST16: &[u8; 3] = b"lu\0"; 253 pub const SCNuFAST32: &[u8; 3] = b"lu\0"; 254 pub const SCNuFAST64: &[u8; 3] = b"lu\0"; 255 pub const SCNo8: &[u8; 4] = b"hho\0"; 256 pub const SCNo16: &[u8; 3] = b"ho\0"; 257 pub const SCNo32: &[u8; 2] = b"o\0"; 258 pub const SCNo64: &[u8; 3] = b"lo\0"; 259 pub const SCNoLEAST8: &[u8; 4] = b"hho\0"; 260 pub const SCNoLEAST16: &[u8; 3] = b"ho\0"; 261 pub const SCNoLEAST32: &[u8; 2] = b"o\0"; 262 pub const SCNoLEAST64: &[u8; 3] = b"lo\0"; 263 pub const SCNoFAST8: &[u8; 4] = b"hho\0"; 264 pub const SCNoFAST16: &[u8; 3] = b"lo\0"; 265 pub const SCNoFAST32: &[u8; 3] = b"lo\0"; 266 pub const SCNoFAST64: &[u8; 3] = b"lo\0"; 267 pub const SCNx8: &[u8; 4] = b"hhx\0"; 268 pub const SCNx16: &[u8; 3] = b"hx\0"; 269 pub const SCNx32: &[u8; 2] = b"x\0"; 270 pub const SCNx64: &[u8; 3] = b"lx\0"; 271 pub const SCNxLEAST8: &[u8; 4] = b"hhx\0"; 272 pub const SCNxLEAST16: &[u8; 3] = b"hx\0"; 273 pub const SCNxLEAST32: &[u8; 2] = b"x\0"; 274 pub const SCNxLEAST64: &[u8; 3] = b"lx\0"; 275 pub const SCNxFAST8: &[u8; 4] = b"hhx\0"; 276 pub const SCNxFAST16: &[u8; 3] = b"lx\0"; 277 pub const SCNxFAST32: &[u8; 3] = b"lx\0"; 278 pub const SCNxFAST64: &[u8; 3] = b"lx\0"; 279 pub const SCNdMAX: &[u8; 3] = b"ld\0"; 280 pub const SCNiMAX: &[u8; 3] = b"li\0"; 281 pub const SCNoMAX: &[u8; 3] = b"lo\0"; 282 pub const SCNuMAX: &[u8; 3] = b"lu\0"; 283 pub const SCNxMAX: &[u8; 3] = b"lx\0"; 284 pub const SCNdPTR: &[u8; 3] = b"ld\0"; 285 pub const SCNiPTR: &[u8; 3] = b"li\0"; 286 pub const SCNoPTR: &[u8; 3] = b"lo\0"; 287 pub const SCNuPTR: &[u8; 3] = b"lu\0"; 288 pub const SCNxPTR: &[u8; 3] = b"lx\0"; 289 pub const __bool_true_false_are_defined: u32 = 1; 290 pub const true_: u32 = 1; 291 pub const false_: u32 = 0; 292 pub const CCAN_COMPILER: &[u8; 3] = b"cc\0"; 293 pub const CCAN_CFLAGS : & [u8 ; 111] = b"-g3 -ggdb -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition\0" ; 294 pub const CCAN_OUTPUT_EXE_CFLAG: &[u8; 3] = b"-o\0"; 295 pub const HAVE_CCAN: u32 = 1; 296 pub const HAVE_UNALIGNED_ACCESS: u32 = 1; 297 pub const HAVE_TYPEOF: u32 = 1; 298 pub const HAVE_BIG_ENDIAN: u32 = 0; 299 pub const HAVE_BYTESWAP_H: u32 = 0; 300 pub const HAVE_BSWAP_64: u32 = 0; 301 pub const HAVE_LITTLE_ENDIAN: u32 = 1; 302 pub const _STDIO_H: u32 = 1; 303 pub const _____fpos_t_defined: u32 = 1; 304 pub const ____mbstate_t_defined: u32 = 1; 305 pub const _____fpos64_t_defined: u32 = 1; 306 pub const ____FILE_defined: u32 = 1; 307 pub const __FILE_defined: u32 = 1; 308 pub const __struct_FILE_defined: u32 = 1; 309 pub const _IO_EOF_SEEN: u32 = 16; 310 pub const _IO_ERR_SEEN: u32 = 32; 311 pub const _IO_USER_LOCK: u32 = 32768; 312 pub const __cookie_io_functions_t_defined: u32 = 1; 313 pub const _IOFBF: u32 = 0; 314 pub const _IOLBF: u32 = 1; 315 pub const _IONBF: u32 = 2; 316 pub const BUFSIZ: u32 = 8192; 317 pub const EOF: i32 = -1; 318 pub const SEEK_SET: u32 = 0; 319 pub const SEEK_CUR: u32 = 1; 320 pub const SEEK_END: u32 = 2; 321 pub const P_tmpdir: &[u8; 5] = b"/tmp\0"; 322 pub const L_tmpnam: u32 = 20; 323 pub const TMP_MAX: u32 = 238328; 324 pub const _BITS_STDIO_LIM_H: u32 = 1; 325 pub const FILENAME_MAX: u32 = 4096; 326 pub const L_ctermid: u32 = 9; 327 pub const FOPEN_MAX: u32 = 16; 328 pub const __HAVE_FLOAT128: u32 = 0; 329 pub const __HAVE_DISTINCT_FLOAT128: u32 = 0; 330 pub const __HAVE_FLOAT64X: u32 = 1; 331 pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1; 332 pub const __HAVE_FLOAT16: u32 = 0; 333 pub const __HAVE_FLOAT32: u32 = 1; 334 pub const __HAVE_FLOAT64: u32 = 1; 335 pub const __HAVE_FLOAT32X: u32 = 1; 336 pub const __HAVE_FLOAT128X: u32 = 0; 337 pub const __HAVE_DISTINCT_FLOAT16: u32 = 0; 338 pub const __HAVE_DISTINCT_FLOAT32: u32 = 0; 339 pub const __HAVE_DISTINCT_FLOAT64: u32 = 0; 340 pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0; 341 pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0; 342 pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0; 343 pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0; 344 pub const _CTYPE_H: u32 = 1; 345 pub const _BITS_ENDIAN_H: u32 = 1; 346 pub const __LITTLE_ENDIAN: u32 = 1234; 347 pub const __BIG_ENDIAN: u32 = 4321; 348 pub const __PDP_ENDIAN: u32 = 3412; 349 pub const _BITS_ENDIANNESS_H: u32 = 1; 350 pub const __BYTE_ORDER: u32 = 1234; 351 pub const __FLOAT_WORD_ORDER: u32 = 1234; 352 pub const _BITS_TYPES_LOCALE_T_H: u32 = 1; 353 pub const _BITS_TYPES___LOCALE_T_H: u32 = 1; 354 pub const _ASSERT_H: u32 = 1; 355 pub const _STRING_H: u32 = 1; 356 pub const _STRINGS_H: u32 = 1; 357 pub const NDB_PACKED_STR: u32 = 1; 358 pub const NDB_PACKED_ID: u32 = 2; 359 pub const NDB_FLAG_NOMIGRATE: u32 = 1; 360 pub const NDB_FLAG_SKIP_NOTE_VERIFY: u32 = 2; 361 pub const NDB_FLAG_NO_FULLTEXT: u32 = 4; 362 pub const NDB_FLAG_NO_NOTE_BLOCKS: u32 = 8; 363 pub const NDB_FLAG_NO_STATS: u32 = 16; 364 pub const NDB_NUM_FILTERS: u32 = 10; 365 pub const MAX_TEXT_SEARCH_RESULTS: u32 = 128; 366 pub const MAX_TEXT_SEARCH_WORDS: u32 = 8; 367 pub const NDB_NUM_BLOCK_TYPES: u32 = 6; 368 pub const NDB_MAX_RELAYS: u32 = 24; 369 pub const NOSTR_BECH32_KNOWN_TYPES: u32 = 7; 370 pub type __u_char = ::std::os::raw::c_uchar; 371 pub type __u_short = ::std::os::raw::c_ushort; 372 pub type __u_int = ::std::os::raw::c_uint; 373 pub type __u_long = ::std::os::raw::c_ulong; 374 pub type __int8_t = ::std::os::raw::c_schar; 375 pub type __uint8_t = ::std::os::raw::c_uchar; 376 pub type __int16_t = ::std::os::raw::c_short; 377 pub type __uint16_t = ::std::os::raw::c_ushort; 378 pub type __int32_t = ::std::os::raw::c_int; 379 pub type __uint32_t = ::std::os::raw::c_uint; 380 pub type __int64_t = ::std::os::raw::c_long; 381 pub type __uint64_t = ::std::os::raw::c_ulong; 382 pub type __int_least8_t = __int8_t; 383 pub type __uint_least8_t = __uint8_t; 384 pub type __int_least16_t = __int16_t; 385 pub type __uint_least16_t = __uint16_t; 386 pub type __int_least32_t = __int32_t; 387 pub type __uint_least32_t = __uint32_t; 388 pub type __int_least64_t = __int64_t; 389 pub type __uint_least64_t = __uint64_t; 390 pub type __quad_t = ::std::os::raw::c_long; 391 pub type __u_quad_t = ::std::os::raw::c_ulong; 392 pub type __intmax_t = ::std::os::raw::c_long; 393 pub type __uintmax_t = ::std::os::raw::c_ulong; 394 pub type __dev_t = ::std::os::raw::c_ulong; 395 pub type __uid_t = ::std::os::raw::c_uint; 396 pub type __gid_t = ::std::os::raw::c_uint; 397 pub type __ino_t = ::std::os::raw::c_ulong; 398 pub type __ino64_t = ::std::os::raw::c_ulong; 399 pub type __mode_t = ::std::os::raw::c_uint; 400 pub type __nlink_t = ::std::os::raw::c_ulong; 401 pub type __off_t = ::std::os::raw::c_long; 402 pub type __off64_t = ::std::os::raw::c_long; 403 pub type __pid_t = ::std::os::raw::c_int; 404 #[repr(C)] 405 #[derive(Debug, Copy, Clone)] 406 pub struct __fsid_t { 407 pub __val: [::std::os::raw::c_int; 2usize], 408 } 409 #[test] 410 fn bindgen_test_layout___fsid_t() { 411 const UNINIT: ::std::mem::MaybeUninit<__fsid_t> = ::std::mem::MaybeUninit::uninit(); 412 let ptr = UNINIT.as_ptr(); 413 assert_eq!( 414 ::std::mem::size_of::<__fsid_t>(), 415 8usize, 416 concat!("Size of: ", stringify!(__fsid_t)) 417 ); 418 assert_eq!( 419 ::std::mem::align_of::<__fsid_t>(), 420 4usize, 421 concat!("Alignment of ", stringify!(__fsid_t)) 422 ); 423 assert_eq!( 424 unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, 425 0usize, 426 concat!( 427 "Offset of field: ", 428 stringify!(__fsid_t), 429 "::", 430 stringify!(__val) 431 ) 432 ); 433 } 434 pub type __clock_t = ::std::os::raw::c_long; 435 pub type __rlim_t = ::std::os::raw::c_ulong; 436 pub type __rlim64_t = ::std::os::raw::c_ulong; 437 pub type __id_t = ::std::os::raw::c_uint; 438 pub type __time_t = ::std::os::raw::c_long; 439 pub type __useconds_t = ::std::os::raw::c_uint; 440 pub type __suseconds_t = ::std::os::raw::c_long; 441 pub type __suseconds64_t = ::std::os::raw::c_long; 442 pub type __daddr_t = ::std::os::raw::c_int; 443 pub type __key_t = ::std::os::raw::c_int; 444 pub type __clockid_t = ::std::os::raw::c_int; 445 pub type __timer_t = *mut ::std::os::raw::c_void; 446 pub type __blksize_t = ::std::os::raw::c_long; 447 pub type __blkcnt_t = ::std::os::raw::c_long; 448 pub type __blkcnt64_t = ::std::os::raw::c_long; 449 pub type __fsblkcnt_t = ::std::os::raw::c_ulong; 450 pub type __fsblkcnt64_t = ::std::os::raw::c_ulong; 451 pub type __fsfilcnt_t = ::std::os::raw::c_ulong; 452 pub type __fsfilcnt64_t = ::std::os::raw::c_ulong; 453 pub type __fsword_t = ::std::os::raw::c_long; 454 pub type __ssize_t = ::std::os::raw::c_long; 455 pub type __syscall_slong_t = ::std::os::raw::c_long; 456 pub type __syscall_ulong_t = ::std::os::raw::c_ulong; 457 pub type __loff_t = __off64_t; 458 pub type __caddr_t = *mut ::std::os::raw::c_char; 459 pub type __intptr_t = ::std::os::raw::c_long; 460 pub type __socklen_t = ::std::os::raw::c_uint; 461 pub type __sig_atomic_t = ::std::os::raw::c_int; 462 pub type int_least8_t = __int_least8_t; 463 pub type int_least16_t = __int_least16_t; 464 pub type int_least32_t = __int_least32_t; 465 pub type int_least64_t = __int_least64_t; 466 pub type uint_least8_t = __uint_least8_t; 467 pub type uint_least16_t = __uint_least16_t; 468 pub type uint_least32_t = __uint_least32_t; 469 pub type uint_least64_t = __uint_least64_t; 470 pub type int_fast8_t = ::std::os::raw::c_schar; 471 pub type int_fast16_t = ::std::os::raw::c_long; 472 pub type int_fast32_t = ::std::os::raw::c_long; 473 pub type int_fast64_t = ::std::os::raw::c_long; 474 pub type uint_fast8_t = ::std::os::raw::c_uchar; 475 pub type uint_fast16_t = ::std::os::raw::c_ulong; 476 pub type uint_fast32_t = ::std::os::raw::c_ulong; 477 pub type uint_fast64_t = ::std::os::raw::c_ulong; 478 pub type intmax_t = __intmax_t; 479 pub type uintmax_t = __uintmax_t; 480 pub type __gwchar_t = ::std::os::raw::c_int; 481 #[repr(C)] 482 #[derive(Debug, Copy, Clone)] 483 pub struct imaxdiv_t { 484 pub quot: ::std::os::raw::c_long, 485 pub rem: ::std::os::raw::c_long, 486 } 487 #[test] 488 fn bindgen_test_layout_imaxdiv_t() { 489 const UNINIT: ::std::mem::MaybeUninit<imaxdiv_t> = ::std::mem::MaybeUninit::uninit(); 490 let ptr = UNINIT.as_ptr(); 491 assert_eq!( 492 ::std::mem::size_of::<imaxdiv_t>(), 493 16usize, 494 concat!("Size of: ", stringify!(imaxdiv_t)) 495 ); 496 assert_eq!( 497 ::std::mem::align_of::<imaxdiv_t>(), 498 8usize, 499 concat!("Alignment of ", stringify!(imaxdiv_t)) 500 ); 501 assert_eq!( 502 unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, 503 0usize, 504 concat!( 505 "Offset of field: ", 506 stringify!(imaxdiv_t), 507 "::", 508 stringify!(quot) 509 ) 510 ); 511 assert_eq!( 512 unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, 513 8usize, 514 concat!( 515 "Offset of field: ", 516 stringify!(imaxdiv_t), 517 "::", 518 stringify!(rem) 519 ) 520 ); 521 } 522 extern "C" { 523 pub fn imaxabs(__n: intmax_t) -> intmax_t; 524 } 525 extern "C" { 526 pub fn imaxdiv(__numer: intmax_t, __denom: intmax_t) -> imaxdiv_t; 527 } 528 extern "C" { 529 pub fn strtoimax( 530 __nptr: *const ::std::os::raw::c_char, 531 __endptr: *mut *mut ::std::os::raw::c_char, 532 __base: ::std::os::raw::c_int, 533 ) -> intmax_t; 534 } 535 extern "C" { 536 pub fn strtoumax( 537 __nptr: *const ::std::os::raw::c_char, 538 __endptr: *mut *mut ::std::os::raw::c_char, 539 __base: ::std::os::raw::c_int, 540 ) -> uintmax_t; 541 } 542 extern "C" { 543 pub fn wcstoimax( 544 __nptr: *const __gwchar_t, 545 __endptr: *mut *mut __gwchar_t, 546 __base: ::std::os::raw::c_int, 547 ) -> intmax_t; 548 } 549 extern "C" { 550 pub fn wcstoumax( 551 __nptr: *const __gwchar_t, 552 __endptr: *mut *mut __gwchar_t, 553 __base: ::std::os::raw::c_int, 554 ) -> uintmax_t; 555 } 556 pub type __gnuc_va_list = __builtin_va_list; 557 #[repr(C)] 558 #[derive(Copy, Clone)] 559 pub struct __mbstate_t { 560 pub __count: ::std::os::raw::c_int, 561 pub __value: __mbstate_t__bindgen_ty_1, 562 } 563 #[repr(C)] 564 #[derive(Copy, Clone)] 565 pub union __mbstate_t__bindgen_ty_1 { 566 pub __wch: ::std::os::raw::c_uint, 567 pub __wchb: [::std::os::raw::c_char; 4usize], 568 } 569 #[test] 570 fn bindgen_test_layout___mbstate_t__bindgen_ty_1() { 571 const UNINIT: ::std::mem::MaybeUninit<__mbstate_t__bindgen_ty_1> = 572 ::std::mem::MaybeUninit::uninit(); 573 let ptr = UNINIT.as_ptr(); 574 assert_eq!( 575 ::std::mem::size_of::<__mbstate_t__bindgen_ty_1>(), 576 4usize, 577 concat!("Size of: ", stringify!(__mbstate_t__bindgen_ty_1)) 578 ); 579 assert_eq!( 580 ::std::mem::align_of::<__mbstate_t__bindgen_ty_1>(), 581 4usize, 582 concat!("Alignment of ", stringify!(__mbstate_t__bindgen_ty_1)) 583 ); 584 assert_eq!( 585 unsafe { ::std::ptr::addr_of!((*ptr).__wch) as usize - ptr as usize }, 586 0usize, 587 concat!( 588 "Offset of field: ", 589 stringify!(__mbstate_t__bindgen_ty_1), 590 "::", 591 stringify!(__wch) 592 ) 593 ); 594 assert_eq!( 595 unsafe { ::std::ptr::addr_of!((*ptr).__wchb) as usize - ptr as usize }, 596 0usize, 597 concat!( 598 "Offset of field: ", 599 stringify!(__mbstate_t__bindgen_ty_1), 600 "::", 601 stringify!(__wchb) 602 ) 603 ); 604 } 605 #[test] 606 fn bindgen_test_layout___mbstate_t() { 607 const UNINIT: ::std::mem::MaybeUninit<__mbstate_t> = ::std::mem::MaybeUninit::uninit(); 608 let ptr = UNINIT.as_ptr(); 609 assert_eq!( 610 ::std::mem::size_of::<__mbstate_t>(), 611 8usize, 612 concat!("Size of: ", stringify!(__mbstate_t)) 613 ); 614 assert_eq!( 615 ::std::mem::align_of::<__mbstate_t>(), 616 4usize, 617 concat!("Alignment of ", stringify!(__mbstate_t)) 618 ); 619 assert_eq!( 620 unsafe { ::std::ptr::addr_of!((*ptr).__count) as usize - ptr as usize }, 621 0usize, 622 concat!( 623 "Offset of field: ", 624 stringify!(__mbstate_t), 625 "::", 626 stringify!(__count) 627 ) 628 ); 629 assert_eq!( 630 unsafe { ::std::ptr::addr_of!((*ptr).__value) as usize - ptr as usize }, 631 4usize, 632 concat!( 633 "Offset of field: ", 634 stringify!(__mbstate_t), 635 "::", 636 stringify!(__value) 637 ) 638 ); 639 } 640 #[repr(C)] 641 #[derive(Copy, Clone)] 642 pub struct _G_fpos_t { 643 pub __pos: __off_t, 644 pub __state: __mbstate_t, 645 } 646 #[test] 647 fn bindgen_test_layout__G_fpos_t() { 648 const UNINIT: ::std::mem::MaybeUninit<_G_fpos_t> = ::std::mem::MaybeUninit::uninit(); 649 let ptr = UNINIT.as_ptr(); 650 assert_eq!( 651 ::std::mem::size_of::<_G_fpos_t>(), 652 16usize, 653 concat!("Size of: ", stringify!(_G_fpos_t)) 654 ); 655 assert_eq!( 656 ::std::mem::align_of::<_G_fpos_t>(), 657 8usize, 658 concat!("Alignment of ", stringify!(_G_fpos_t)) 659 ); 660 assert_eq!( 661 unsafe { ::std::ptr::addr_of!((*ptr).__pos) as usize - ptr as usize }, 662 0usize, 663 concat!( 664 "Offset of field: ", 665 stringify!(_G_fpos_t), 666 "::", 667 stringify!(__pos) 668 ) 669 ); 670 assert_eq!( 671 unsafe { ::std::ptr::addr_of!((*ptr).__state) as usize - ptr as usize }, 672 8usize, 673 concat!( 674 "Offset of field: ", 675 stringify!(_G_fpos_t), 676 "::", 677 stringify!(__state) 678 ) 679 ); 680 } 681 pub type __fpos_t = _G_fpos_t; 682 #[repr(C)] 683 #[derive(Copy, Clone)] 684 pub struct _G_fpos64_t { 685 pub __pos: __off64_t, 686 pub __state: __mbstate_t, 687 } 688 #[test] 689 fn bindgen_test_layout__G_fpos64_t() { 690 const UNINIT: ::std::mem::MaybeUninit<_G_fpos64_t> = ::std::mem::MaybeUninit::uninit(); 691 let ptr = UNINIT.as_ptr(); 692 assert_eq!( 693 ::std::mem::size_of::<_G_fpos64_t>(), 694 16usize, 695 concat!("Size of: ", stringify!(_G_fpos64_t)) 696 ); 697 assert_eq!( 698 ::std::mem::align_of::<_G_fpos64_t>(), 699 8usize, 700 concat!("Alignment of ", stringify!(_G_fpos64_t)) 701 ); 702 assert_eq!( 703 unsafe { ::std::ptr::addr_of!((*ptr).__pos) as usize - ptr as usize }, 704 0usize, 705 concat!( 706 "Offset of field: ", 707 stringify!(_G_fpos64_t), 708 "::", 709 stringify!(__pos) 710 ) 711 ); 712 assert_eq!( 713 unsafe { ::std::ptr::addr_of!((*ptr).__state) as usize - ptr as usize }, 714 8usize, 715 concat!( 716 "Offset of field: ", 717 stringify!(_G_fpos64_t), 718 "::", 719 stringify!(__state) 720 ) 721 ); 722 } 723 pub type __fpos64_t = _G_fpos64_t; 724 pub type __FILE = _IO_FILE; 725 pub type FILE = _IO_FILE; 726 #[repr(C)] 727 #[derive(Debug, Copy, Clone)] 728 pub struct _IO_marker { 729 _unused: [u8; 0], 730 } 731 #[repr(C)] 732 #[derive(Debug, Copy, Clone)] 733 pub struct _IO_codecvt { 734 _unused: [u8; 0], 735 } 736 #[repr(C)] 737 #[derive(Debug, Copy, Clone)] 738 pub struct _IO_wide_data { 739 _unused: [u8; 0], 740 } 741 pub type _IO_lock_t = ::std::os::raw::c_void; 742 #[repr(C)] 743 #[derive(Debug, Copy, Clone)] 744 pub struct _IO_FILE { 745 pub _flags: ::std::os::raw::c_int, 746 pub _IO_read_ptr: *mut ::std::os::raw::c_char, 747 pub _IO_read_end: *mut ::std::os::raw::c_char, 748 pub _IO_read_base: *mut ::std::os::raw::c_char, 749 pub _IO_write_base: *mut ::std::os::raw::c_char, 750 pub _IO_write_ptr: *mut ::std::os::raw::c_char, 751 pub _IO_write_end: *mut ::std::os::raw::c_char, 752 pub _IO_buf_base: *mut ::std::os::raw::c_char, 753 pub _IO_buf_end: *mut ::std::os::raw::c_char, 754 pub _IO_save_base: *mut ::std::os::raw::c_char, 755 pub _IO_backup_base: *mut ::std::os::raw::c_char, 756 pub _IO_save_end: *mut ::std::os::raw::c_char, 757 pub _markers: *mut _IO_marker, 758 pub _chain: *mut _IO_FILE, 759 pub _fileno: ::std::os::raw::c_int, 760 pub _flags2: ::std::os::raw::c_int, 761 pub _old_offset: __off_t, 762 pub _cur_column: ::std::os::raw::c_ushort, 763 pub _vtable_offset: ::std::os::raw::c_schar, 764 pub _shortbuf: [::std::os::raw::c_char; 1usize], 765 pub _lock: *mut _IO_lock_t, 766 pub _offset: __off64_t, 767 pub _codecvt: *mut _IO_codecvt, 768 pub _wide_data: *mut _IO_wide_data, 769 pub _freeres_list: *mut _IO_FILE, 770 pub _freeres_buf: *mut ::std::os::raw::c_void, 771 pub _prevchain: *mut *mut _IO_FILE, 772 pub _mode: ::std::os::raw::c_int, 773 pub _unused2: [::std::os::raw::c_char; 20usize], 774 } 775 #[test] 776 fn bindgen_test_layout__IO_FILE() { 777 const UNINIT: ::std::mem::MaybeUninit<_IO_FILE> = ::std::mem::MaybeUninit::uninit(); 778 let ptr = UNINIT.as_ptr(); 779 assert_eq!( 780 ::std::mem::size_of::<_IO_FILE>(), 781 216usize, 782 concat!("Size of: ", stringify!(_IO_FILE)) 783 ); 784 assert_eq!( 785 ::std::mem::align_of::<_IO_FILE>(), 786 8usize, 787 concat!("Alignment of ", stringify!(_IO_FILE)) 788 ); 789 assert_eq!( 790 unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, 791 0usize, 792 concat!( 793 "Offset of field: ", 794 stringify!(_IO_FILE), 795 "::", 796 stringify!(_flags) 797 ) 798 ); 799 assert_eq!( 800 unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_ptr) as usize - ptr as usize }, 801 8usize, 802 concat!( 803 "Offset of field: ", 804 stringify!(_IO_FILE), 805 "::", 806 stringify!(_IO_read_ptr) 807 ) 808 ); 809 assert_eq!( 810 unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_end) as usize - ptr as usize }, 811 16usize, 812 concat!( 813 "Offset of field: ", 814 stringify!(_IO_FILE), 815 "::", 816 stringify!(_IO_read_end) 817 ) 818 ); 819 assert_eq!( 820 unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_base) as usize - ptr as usize }, 821 24usize, 822 concat!( 823 "Offset of field: ", 824 stringify!(_IO_FILE), 825 "::", 826 stringify!(_IO_read_base) 827 ) 828 ); 829 assert_eq!( 830 unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_base) as usize - ptr as usize }, 831 32usize, 832 concat!( 833 "Offset of field: ", 834 stringify!(_IO_FILE), 835 "::", 836 stringify!(_IO_write_base) 837 ) 838 ); 839 assert_eq!( 840 unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_ptr) as usize - ptr as usize }, 841 40usize, 842 concat!( 843 "Offset of field: ", 844 stringify!(_IO_FILE), 845 "::", 846 stringify!(_IO_write_ptr) 847 ) 848 ); 849 assert_eq!( 850 unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_end) as usize - ptr as usize }, 851 48usize, 852 concat!( 853 "Offset of field: ", 854 stringify!(_IO_FILE), 855 "::", 856 stringify!(_IO_write_end) 857 ) 858 ); 859 assert_eq!( 860 unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_base) as usize - ptr as usize }, 861 56usize, 862 concat!( 863 "Offset of field: ", 864 stringify!(_IO_FILE), 865 "::", 866 stringify!(_IO_buf_base) 867 ) 868 ); 869 assert_eq!( 870 unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_end) as usize - ptr as usize }, 871 64usize, 872 concat!( 873 "Offset of field: ", 874 stringify!(_IO_FILE), 875 "::", 876 stringify!(_IO_buf_end) 877 ) 878 ); 879 assert_eq!( 880 unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_base) as usize - ptr as usize }, 881 72usize, 882 concat!( 883 "Offset of field: ", 884 stringify!(_IO_FILE), 885 "::", 886 stringify!(_IO_save_base) 887 ) 888 ); 889 assert_eq!( 890 unsafe { ::std::ptr::addr_of!((*ptr)._IO_backup_base) as usize - ptr as usize }, 891 80usize, 892 concat!( 893 "Offset of field: ", 894 stringify!(_IO_FILE), 895 "::", 896 stringify!(_IO_backup_base) 897 ) 898 ); 899 assert_eq!( 900 unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_end) as usize - ptr as usize }, 901 88usize, 902 concat!( 903 "Offset of field: ", 904 stringify!(_IO_FILE), 905 "::", 906 stringify!(_IO_save_end) 907 ) 908 ); 909 assert_eq!( 910 unsafe { ::std::ptr::addr_of!((*ptr)._markers) as usize - ptr as usize }, 911 96usize, 912 concat!( 913 "Offset of field: ", 914 stringify!(_IO_FILE), 915 "::", 916 stringify!(_markers) 917 ) 918 ); 919 assert_eq!( 920 unsafe { ::std::ptr::addr_of!((*ptr)._chain) as usize - ptr as usize }, 921 104usize, 922 concat!( 923 "Offset of field: ", 924 stringify!(_IO_FILE), 925 "::", 926 stringify!(_chain) 927 ) 928 ); 929 assert_eq!( 930 unsafe { ::std::ptr::addr_of!((*ptr)._fileno) as usize - ptr as usize }, 931 112usize, 932 concat!( 933 "Offset of field: ", 934 stringify!(_IO_FILE), 935 "::", 936 stringify!(_fileno) 937 ) 938 ); 939 assert_eq!( 940 unsafe { ::std::ptr::addr_of!((*ptr)._flags2) as usize - ptr as usize }, 941 116usize, 942 concat!( 943 "Offset of field: ", 944 stringify!(_IO_FILE), 945 "::", 946 stringify!(_flags2) 947 ) 948 ); 949 assert_eq!( 950 unsafe { ::std::ptr::addr_of!((*ptr)._old_offset) as usize - ptr as usize }, 951 120usize, 952 concat!( 953 "Offset of field: ", 954 stringify!(_IO_FILE), 955 "::", 956 stringify!(_old_offset) 957 ) 958 ); 959 assert_eq!( 960 unsafe { ::std::ptr::addr_of!((*ptr)._cur_column) as usize - ptr as usize }, 961 128usize, 962 concat!( 963 "Offset of field: ", 964 stringify!(_IO_FILE), 965 "::", 966 stringify!(_cur_column) 967 ) 968 ); 969 assert_eq!( 970 unsafe { ::std::ptr::addr_of!((*ptr)._vtable_offset) as usize - ptr as usize }, 971 130usize, 972 concat!( 973 "Offset of field: ", 974 stringify!(_IO_FILE), 975 "::", 976 stringify!(_vtable_offset) 977 ) 978 ); 979 assert_eq!( 980 unsafe { ::std::ptr::addr_of!((*ptr)._shortbuf) as usize - ptr as usize }, 981 131usize, 982 concat!( 983 "Offset of field: ", 984 stringify!(_IO_FILE), 985 "::", 986 stringify!(_shortbuf) 987 ) 988 ); 989 assert_eq!( 990 unsafe { ::std::ptr::addr_of!((*ptr)._lock) as usize - ptr as usize }, 991 136usize, 992 concat!( 993 "Offset of field: ", 994 stringify!(_IO_FILE), 995 "::", 996 stringify!(_lock) 997 ) 998 ); 999 assert_eq!( 1000 unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize }, 1001 144usize, 1002 concat!( 1003 "Offset of field: ", 1004 stringify!(_IO_FILE), 1005 "::", 1006 stringify!(_offset) 1007 ) 1008 ); 1009 assert_eq!( 1010 unsafe { ::std::ptr::addr_of!((*ptr)._codecvt) as usize - ptr as usize }, 1011 152usize, 1012 concat!( 1013 "Offset of field: ", 1014 stringify!(_IO_FILE), 1015 "::", 1016 stringify!(_codecvt) 1017 ) 1018 ); 1019 assert_eq!( 1020 unsafe { ::std::ptr::addr_of!((*ptr)._wide_data) as usize - ptr as usize }, 1021 160usize, 1022 concat!( 1023 "Offset of field: ", 1024 stringify!(_IO_FILE), 1025 "::", 1026 stringify!(_wide_data) 1027 ) 1028 ); 1029 assert_eq!( 1030 unsafe { ::std::ptr::addr_of!((*ptr)._freeres_list) as usize - ptr as usize }, 1031 168usize, 1032 concat!( 1033 "Offset of field: ", 1034 stringify!(_IO_FILE), 1035 "::", 1036 stringify!(_freeres_list) 1037 ) 1038 ); 1039 assert_eq!( 1040 unsafe { ::std::ptr::addr_of!((*ptr)._freeres_buf) as usize - ptr as usize }, 1041 176usize, 1042 concat!( 1043 "Offset of field: ", 1044 stringify!(_IO_FILE), 1045 "::", 1046 stringify!(_freeres_buf) 1047 ) 1048 ); 1049 assert_eq!( 1050 unsafe { ::std::ptr::addr_of!((*ptr)._prevchain) as usize - ptr as usize }, 1051 184usize, 1052 concat!( 1053 "Offset of field: ", 1054 stringify!(_IO_FILE), 1055 "::", 1056 stringify!(_prevchain) 1057 ) 1058 ); 1059 assert_eq!( 1060 unsafe { ::std::ptr::addr_of!((*ptr)._mode) as usize - ptr as usize }, 1061 192usize, 1062 concat!( 1063 "Offset of field: ", 1064 stringify!(_IO_FILE), 1065 "::", 1066 stringify!(_mode) 1067 ) 1068 ); 1069 assert_eq!( 1070 unsafe { ::std::ptr::addr_of!((*ptr)._unused2) as usize - ptr as usize }, 1071 196usize, 1072 concat!( 1073 "Offset of field: ", 1074 stringify!(_IO_FILE), 1075 "::", 1076 stringify!(_unused2) 1077 ) 1078 ); 1079 } 1080 pub type cookie_read_function_t = ::std::option::Option< 1081 unsafe extern "C" fn( 1082 __cookie: *mut ::std::os::raw::c_void, 1083 __buf: *mut ::std::os::raw::c_char, 1084 __nbytes: usize, 1085 ) -> __ssize_t, 1086 >; 1087 pub type cookie_write_function_t = ::std::option::Option< 1088 unsafe extern "C" fn( 1089 __cookie: *mut ::std::os::raw::c_void, 1090 __buf: *const ::std::os::raw::c_char, 1091 __nbytes: usize, 1092 ) -> __ssize_t, 1093 >; 1094 pub type cookie_seek_function_t = ::std::option::Option< 1095 unsafe extern "C" fn( 1096 __cookie: *mut ::std::os::raw::c_void, 1097 __pos: *mut __off64_t, 1098 __w: ::std::os::raw::c_int, 1099 ) -> ::std::os::raw::c_int, 1100 >; 1101 pub type cookie_close_function_t = ::std::option::Option< 1102 unsafe extern "C" fn(__cookie: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, 1103 >; 1104 #[repr(C)] 1105 #[derive(Debug, Copy, Clone)] 1106 pub struct _IO_cookie_io_functions_t { 1107 pub read: cookie_read_function_t, 1108 pub write: cookie_write_function_t, 1109 pub seek: cookie_seek_function_t, 1110 pub close: cookie_close_function_t, 1111 } 1112 #[test] 1113 fn bindgen_test_layout__IO_cookie_io_functions_t() { 1114 const UNINIT: ::std::mem::MaybeUninit<_IO_cookie_io_functions_t> = 1115 ::std::mem::MaybeUninit::uninit(); 1116 let ptr = UNINIT.as_ptr(); 1117 assert_eq!( 1118 ::std::mem::size_of::<_IO_cookie_io_functions_t>(), 1119 32usize, 1120 concat!("Size of: ", stringify!(_IO_cookie_io_functions_t)) 1121 ); 1122 assert_eq!( 1123 ::std::mem::align_of::<_IO_cookie_io_functions_t>(), 1124 8usize, 1125 concat!("Alignment of ", stringify!(_IO_cookie_io_functions_t)) 1126 ); 1127 assert_eq!( 1128 unsafe { ::std::ptr::addr_of!((*ptr).read) as usize - ptr as usize }, 1129 0usize, 1130 concat!( 1131 "Offset of field: ", 1132 stringify!(_IO_cookie_io_functions_t), 1133 "::", 1134 stringify!(read) 1135 ) 1136 ); 1137 assert_eq!( 1138 unsafe { ::std::ptr::addr_of!((*ptr).write) as usize - ptr as usize }, 1139 8usize, 1140 concat!( 1141 "Offset of field: ", 1142 stringify!(_IO_cookie_io_functions_t), 1143 "::", 1144 stringify!(write) 1145 ) 1146 ); 1147 assert_eq!( 1148 unsafe { ::std::ptr::addr_of!((*ptr).seek) as usize - ptr as usize }, 1149 16usize, 1150 concat!( 1151 "Offset of field: ", 1152 stringify!(_IO_cookie_io_functions_t), 1153 "::", 1154 stringify!(seek) 1155 ) 1156 ); 1157 assert_eq!( 1158 unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, 1159 24usize, 1160 concat!( 1161 "Offset of field: ", 1162 stringify!(_IO_cookie_io_functions_t), 1163 "::", 1164 stringify!(close) 1165 ) 1166 ); 1167 } 1168 pub type cookie_io_functions_t = _IO_cookie_io_functions_t; 1169 pub type va_list = __gnuc_va_list; 1170 pub type off_t = __off_t; 1171 pub type fpos_t = __fpos_t; 1172 extern "C" { 1173 pub static mut stdin: *mut FILE; 1174 } 1175 extern "C" { 1176 pub static mut stdout: *mut FILE; 1177 } 1178 extern "C" { 1179 pub static mut stderr: *mut FILE; 1180 } 1181 extern "C" { 1182 pub fn remove(__filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; 1183 } 1184 extern "C" { 1185 pub fn rename( 1186 __old: *const ::std::os::raw::c_char, 1187 __new: *const ::std::os::raw::c_char, 1188 ) -> ::std::os::raw::c_int; 1189 } 1190 extern "C" { 1191 pub fn renameat( 1192 __oldfd: ::std::os::raw::c_int, 1193 __old: *const ::std::os::raw::c_char, 1194 __newfd: ::std::os::raw::c_int, 1195 __new: *const ::std::os::raw::c_char, 1196 ) -> ::std::os::raw::c_int; 1197 } 1198 extern "C" { 1199 pub fn fclose(__stream: *mut FILE) -> ::std::os::raw::c_int; 1200 } 1201 extern "C" { 1202 pub fn tmpfile() -> *mut FILE; 1203 } 1204 extern "C" { 1205 pub fn tmpnam(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; 1206 } 1207 extern "C" { 1208 pub fn tmpnam_r(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; 1209 } 1210 extern "C" { 1211 pub fn tempnam( 1212 __dir: *const ::std::os::raw::c_char, 1213 __pfx: *const ::std::os::raw::c_char, 1214 ) -> *mut ::std::os::raw::c_char; 1215 } 1216 extern "C" { 1217 pub fn fflush(__stream: *mut FILE) -> ::std::os::raw::c_int; 1218 } 1219 extern "C" { 1220 pub fn fflush_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; 1221 } 1222 extern "C" { 1223 pub fn fopen( 1224 __filename: *const ::std::os::raw::c_char, 1225 __modes: *const ::std::os::raw::c_char, 1226 ) -> *mut FILE; 1227 } 1228 extern "C" { 1229 pub fn freopen( 1230 __filename: *const ::std::os::raw::c_char, 1231 __modes: *const ::std::os::raw::c_char, 1232 __stream: *mut FILE, 1233 ) -> *mut FILE; 1234 } 1235 extern "C" { 1236 pub fn fdopen(__fd: ::std::os::raw::c_int, __modes: *const ::std::os::raw::c_char) 1237 -> *mut FILE; 1238 } 1239 extern "C" { 1240 pub fn fopencookie( 1241 __magic_cookie: *mut ::std::os::raw::c_void, 1242 __modes: *const ::std::os::raw::c_char, 1243 __io_funcs: cookie_io_functions_t, 1244 ) -> *mut FILE; 1245 } 1246 extern "C" { 1247 pub fn fmemopen( 1248 __s: *mut ::std::os::raw::c_void, 1249 __len: usize, 1250 __modes: *const ::std::os::raw::c_char, 1251 ) -> *mut FILE; 1252 } 1253 extern "C" { 1254 pub fn open_memstream( 1255 __bufloc: *mut *mut ::std::os::raw::c_char, 1256 __sizeloc: *mut usize, 1257 ) -> *mut FILE; 1258 } 1259 extern "C" { 1260 pub fn setbuf(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char); 1261 } 1262 extern "C" { 1263 pub fn setvbuf( 1264 __stream: *mut FILE, 1265 __buf: *mut ::std::os::raw::c_char, 1266 __modes: ::std::os::raw::c_int, 1267 __n: usize, 1268 ) -> ::std::os::raw::c_int; 1269 } 1270 extern "C" { 1271 pub fn setbuffer(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char, __size: usize); 1272 } 1273 extern "C" { 1274 pub fn setlinebuf(__stream: *mut FILE); 1275 } 1276 extern "C" { 1277 pub fn fprintf( 1278 __stream: *mut FILE, 1279 __format: *const ::std::os::raw::c_char, 1280 ... 1281 ) -> ::std::os::raw::c_int; 1282 } 1283 extern "C" { 1284 pub fn printf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; 1285 } 1286 extern "C" { 1287 pub fn sprintf( 1288 __s: *mut ::std::os::raw::c_char, 1289 __format: *const ::std::os::raw::c_char, 1290 ... 1291 ) -> ::std::os::raw::c_int; 1292 } 1293 extern "C" { 1294 pub fn vfprintf( 1295 __s: *mut FILE, 1296 __format: *const ::std::os::raw::c_char, 1297 __arg: *mut __va_list_tag, 1298 ) -> ::std::os::raw::c_int; 1299 } 1300 extern "C" { 1301 pub fn vprintf( 1302 __format: *const ::std::os::raw::c_char, 1303 __arg: *mut __va_list_tag, 1304 ) -> ::std::os::raw::c_int; 1305 } 1306 extern "C" { 1307 pub fn vsprintf( 1308 __s: *mut ::std::os::raw::c_char, 1309 __format: *const ::std::os::raw::c_char, 1310 __arg: *mut __va_list_tag, 1311 ) -> ::std::os::raw::c_int; 1312 } 1313 extern "C" { 1314 pub fn snprintf( 1315 __s: *mut ::std::os::raw::c_char, 1316 __maxlen: ::std::os::raw::c_ulong, 1317 __format: *const ::std::os::raw::c_char, 1318 ... 1319 ) -> ::std::os::raw::c_int; 1320 } 1321 extern "C" { 1322 pub fn vsnprintf( 1323 __s: *mut ::std::os::raw::c_char, 1324 __maxlen: ::std::os::raw::c_ulong, 1325 __format: *const ::std::os::raw::c_char, 1326 __arg: *mut __va_list_tag, 1327 ) -> ::std::os::raw::c_int; 1328 } 1329 extern "C" { 1330 pub fn vasprintf( 1331 __ptr: *mut *mut ::std::os::raw::c_char, 1332 __f: *const ::std::os::raw::c_char, 1333 __arg: *mut __va_list_tag, 1334 ) -> ::std::os::raw::c_int; 1335 } 1336 extern "C" { 1337 pub fn __asprintf( 1338 __ptr: *mut *mut ::std::os::raw::c_char, 1339 __fmt: *const ::std::os::raw::c_char, 1340 ... 1341 ) -> ::std::os::raw::c_int; 1342 } 1343 extern "C" { 1344 pub fn asprintf( 1345 __ptr: *mut *mut ::std::os::raw::c_char, 1346 __fmt: *const ::std::os::raw::c_char, 1347 ... 1348 ) -> ::std::os::raw::c_int; 1349 } 1350 extern "C" { 1351 pub fn vdprintf( 1352 __fd: ::std::os::raw::c_int, 1353 __fmt: *const ::std::os::raw::c_char, 1354 __arg: *mut __va_list_tag, 1355 ) -> ::std::os::raw::c_int; 1356 } 1357 extern "C" { 1358 pub fn dprintf( 1359 __fd: ::std::os::raw::c_int, 1360 __fmt: *const ::std::os::raw::c_char, 1361 ... 1362 ) -> ::std::os::raw::c_int; 1363 } 1364 extern "C" { 1365 pub fn fscanf( 1366 __stream: *mut FILE, 1367 __format: *const ::std::os::raw::c_char, 1368 ... 1369 ) -> ::std::os::raw::c_int; 1370 } 1371 extern "C" { 1372 pub fn scanf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; 1373 } 1374 extern "C" { 1375 pub fn sscanf( 1376 __s: *const ::std::os::raw::c_char, 1377 __format: *const ::std::os::raw::c_char, 1378 ... 1379 ) -> ::std::os::raw::c_int; 1380 } 1381 pub type _Float32 = f32; 1382 pub type _Float64 = f64; 1383 pub type _Float32x = f64; 1384 pub type _Float64x = u128; 1385 extern "C" { 1386 #[link_name = "\u{1}__isoc99_fscanf"] 1387 pub fn fscanf1( 1388 __stream: *mut FILE, 1389 __format: *const ::std::os::raw::c_char, 1390 ... 1391 ) -> ::std::os::raw::c_int; 1392 } 1393 extern "C" { 1394 #[link_name = "\u{1}__isoc99_scanf"] 1395 pub fn scanf1(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; 1396 } 1397 extern "C" { 1398 #[link_name = "\u{1}__isoc99_sscanf"] 1399 pub fn sscanf1( 1400 __s: *const ::std::os::raw::c_char, 1401 __format: *const ::std::os::raw::c_char, 1402 ... 1403 ) -> ::std::os::raw::c_int; 1404 } 1405 extern "C" { 1406 pub fn vfscanf( 1407 __s: *mut FILE, 1408 __format: *const ::std::os::raw::c_char, 1409 __arg: *mut __va_list_tag, 1410 ) -> ::std::os::raw::c_int; 1411 } 1412 extern "C" { 1413 pub fn vscanf( 1414 __format: *const ::std::os::raw::c_char, 1415 __arg: *mut __va_list_tag, 1416 ) -> ::std::os::raw::c_int; 1417 } 1418 extern "C" { 1419 pub fn vsscanf( 1420 __s: *const ::std::os::raw::c_char, 1421 __format: *const ::std::os::raw::c_char, 1422 __arg: *mut __va_list_tag, 1423 ) -> ::std::os::raw::c_int; 1424 } 1425 extern "C" { 1426 #[link_name = "\u{1}__isoc99_vfscanf"] 1427 pub fn vfscanf1( 1428 __s: *mut FILE, 1429 __format: *const ::std::os::raw::c_char, 1430 __arg: *mut __va_list_tag, 1431 ) -> ::std::os::raw::c_int; 1432 } 1433 extern "C" { 1434 #[link_name = "\u{1}__isoc99_vscanf"] 1435 pub fn vscanf1( 1436 __format: *const ::std::os::raw::c_char, 1437 __arg: *mut __va_list_tag, 1438 ) -> ::std::os::raw::c_int; 1439 } 1440 extern "C" { 1441 #[link_name = "\u{1}__isoc99_vsscanf"] 1442 pub fn vsscanf1( 1443 __s: *const ::std::os::raw::c_char, 1444 __format: *const ::std::os::raw::c_char, 1445 __arg: *mut __va_list_tag, 1446 ) -> ::std::os::raw::c_int; 1447 } 1448 extern "C" { 1449 pub fn fgetc(__stream: *mut FILE) -> ::std::os::raw::c_int; 1450 } 1451 extern "C" { 1452 pub fn getc(__stream: *mut FILE) -> ::std::os::raw::c_int; 1453 } 1454 extern "C" { 1455 pub fn getchar() -> ::std::os::raw::c_int; 1456 } 1457 extern "C" { 1458 pub fn getc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; 1459 } 1460 extern "C" { 1461 pub fn getchar_unlocked() -> ::std::os::raw::c_int; 1462 } 1463 extern "C" { 1464 pub fn fgetc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; 1465 } 1466 extern "C" { 1467 pub fn fputc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; 1468 } 1469 extern "C" { 1470 pub fn putc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; 1471 } 1472 extern "C" { 1473 pub fn putchar(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1474 } 1475 extern "C" { 1476 pub fn fputc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) 1477 -> ::std::os::raw::c_int; 1478 } 1479 extern "C" { 1480 pub fn putc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; 1481 } 1482 extern "C" { 1483 pub fn putchar_unlocked(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1484 } 1485 extern "C" { 1486 pub fn getw(__stream: *mut FILE) -> ::std::os::raw::c_int; 1487 } 1488 extern "C" { 1489 pub fn putw(__w: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; 1490 } 1491 extern "C" { 1492 pub fn fgets( 1493 __s: *mut ::std::os::raw::c_char, 1494 __n: ::std::os::raw::c_int, 1495 __stream: *mut FILE, 1496 ) -> *mut ::std::os::raw::c_char; 1497 } 1498 extern "C" { 1499 pub fn __getdelim( 1500 __lineptr: *mut *mut ::std::os::raw::c_char, 1501 __n: *mut usize, 1502 __delimiter: ::std::os::raw::c_int, 1503 __stream: *mut FILE, 1504 ) -> __ssize_t; 1505 } 1506 extern "C" { 1507 pub fn getdelim( 1508 __lineptr: *mut *mut ::std::os::raw::c_char, 1509 __n: *mut usize, 1510 __delimiter: ::std::os::raw::c_int, 1511 __stream: *mut FILE, 1512 ) -> __ssize_t; 1513 } 1514 extern "C" { 1515 pub fn getline( 1516 __lineptr: *mut *mut ::std::os::raw::c_char, 1517 __n: *mut usize, 1518 __stream: *mut FILE, 1519 ) -> __ssize_t; 1520 } 1521 extern "C" { 1522 pub fn fputs(__s: *const ::std::os::raw::c_char, __stream: *mut FILE) -> ::std::os::raw::c_int; 1523 } 1524 extern "C" { 1525 pub fn puts(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; 1526 } 1527 extern "C" { 1528 pub fn ungetc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; 1529 } 1530 extern "C" { 1531 pub fn fread( 1532 __ptr: *mut ::std::os::raw::c_void, 1533 __size: ::std::os::raw::c_ulong, 1534 __n: ::std::os::raw::c_ulong, 1535 __stream: *mut FILE, 1536 ) -> ::std::os::raw::c_ulong; 1537 } 1538 extern "C" { 1539 pub fn fwrite( 1540 __ptr: *const ::std::os::raw::c_void, 1541 __size: ::std::os::raw::c_ulong, 1542 __n: ::std::os::raw::c_ulong, 1543 __s: *mut FILE, 1544 ) -> ::std::os::raw::c_ulong; 1545 } 1546 extern "C" { 1547 pub fn fread_unlocked( 1548 __ptr: *mut ::std::os::raw::c_void, 1549 __size: usize, 1550 __n: usize, 1551 __stream: *mut FILE, 1552 ) -> usize; 1553 } 1554 extern "C" { 1555 pub fn fwrite_unlocked( 1556 __ptr: *const ::std::os::raw::c_void, 1557 __size: usize, 1558 __n: usize, 1559 __stream: *mut FILE, 1560 ) -> usize; 1561 } 1562 extern "C" { 1563 pub fn fseek( 1564 __stream: *mut FILE, 1565 __off: ::std::os::raw::c_long, 1566 __whence: ::std::os::raw::c_int, 1567 ) -> ::std::os::raw::c_int; 1568 } 1569 extern "C" { 1570 pub fn ftell(__stream: *mut FILE) -> ::std::os::raw::c_long; 1571 } 1572 extern "C" { 1573 pub fn rewind(__stream: *mut FILE); 1574 } 1575 extern "C" { 1576 pub fn fseeko( 1577 __stream: *mut FILE, 1578 __off: __off_t, 1579 __whence: ::std::os::raw::c_int, 1580 ) -> ::std::os::raw::c_int; 1581 } 1582 extern "C" { 1583 pub fn ftello(__stream: *mut FILE) -> __off_t; 1584 } 1585 extern "C" { 1586 pub fn fgetpos(__stream: *mut FILE, __pos: *mut fpos_t) -> ::std::os::raw::c_int; 1587 } 1588 extern "C" { 1589 pub fn fsetpos(__stream: *mut FILE, __pos: *const fpos_t) -> ::std::os::raw::c_int; 1590 } 1591 extern "C" { 1592 pub fn clearerr(__stream: *mut FILE); 1593 } 1594 extern "C" { 1595 pub fn feof(__stream: *mut FILE) -> ::std::os::raw::c_int; 1596 } 1597 extern "C" { 1598 pub fn ferror(__stream: *mut FILE) -> ::std::os::raw::c_int; 1599 } 1600 extern "C" { 1601 pub fn clearerr_unlocked(__stream: *mut FILE); 1602 } 1603 extern "C" { 1604 pub fn feof_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; 1605 } 1606 extern "C" { 1607 pub fn ferror_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; 1608 } 1609 extern "C" { 1610 pub fn perror(__s: *const ::std::os::raw::c_char); 1611 } 1612 extern "C" { 1613 pub fn fileno(__stream: *mut FILE) -> ::std::os::raw::c_int; 1614 } 1615 extern "C" { 1616 pub fn fileno_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; 1617 } 1618 extern "C" { 1619 pub fn pclose(__stream: *mut FILE) -> ::std::os::raw::c_int; 1620 } 1621 extern "C" { 1622 pub fn popen( 1623 __command: *const ::std::os::raw::c_char, 1624 __modes: *const ::std::os::raw::c_char, 1625 ) -> *mut FILE; 1626 } 1627 extern "C" { 1628 pub fn ctermid(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; 1629 } 1630 extern "C" { 1631 pub fn flockfile(__stream: *mut FILE); 1632 } 1633 extern "C" { 1634 pub fn ftrylockfile(__stream: *mut FILE) -> ::std::os::raw::c_int; 1635 } 1636 extern "C" { 1637 pub fn funlockfile(__stream: *mut FILE); 1638 } 1639 extern "C" { 1640 pub fn __uflow(arg1: *mut FILE) -> ::std::os::raw::c_int; 1641 } 1642 extern "C" { 1643 pub fn __overflow(arg1: *mut FILE, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1644 } 1645 pub const _ISupper: _bindgen_ty_1 = 256; 1646 pub const _ISlower: _bindgen_ty_1 = 512; 1647 pub const _ISalpha: _bindgen_ty_1 = 1024; 1648 pub const _ISdigit: _bindgen_ty_1 = 2048; 1649 pub const _ISxdigit: _bindgen_ty_1 = 4096; 1650 pub const _ISspace: _bindgen_ty_1 = 8192; 1651 pub const _ISprint: _bindgen_ty_1 = 16384; 1652 pub const _ISgraph: _bindgen_ty_1 = 32768; 1653 pub const _ISblank: _bindgen_ty_1 = 1; 1654 pub const _IScntrl: _bindgen_ty_1 = 2; 1655 pub const _ISpunct: _bindgen_ty_1 = 4; 1656 pub const _ISalnum: _bindgen_ty_1 = 8; 1657 pub type _bindgen_ty_1 = ::std::os::raw::c_uint; 1658 extern "C" { 1659 pub fn __ctype_b_loc() -> *mut *const ::std::os::raw::c_ushort; 1660 } 1661 extern "C" { 1662 pub fn __ctype_tolower_loc() -> *mut *const __int32_t; 1663 } 1664 extern "C" { 1665 pub fn __ctype_toupper_loc() -> *mut *const __int32_t; 1666 } 1667 extern "C" { 1668 pub fn isalnum(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1669 } 1670 extern "C" { 1671 pub fn isalpha(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1672 } 1673 extern "C" { 1674 pub fn iscntrl(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1675 } 1676 extern "C" { 1677 pub fn isdigit(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1678 } 1679 extern "C" { 1680 pub fn islower(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1681 } 1682 extern "C" { 1683 pub fn isgraph(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1684 } 1685 extern "C" { 1686 pub fn isprint(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1687 } 1688 extern "C" { 1689 pub fn ispunct(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1690 } 1691 extern "C" { 1692 pub fn isspace(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1693 } 1694 extern "C" { 1695 pub fn isupper(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1696 } 1697 extern "C" { 1698 pub fn isxdigit(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1699 } 1700 extern "C" { 1701 pub fn tolower(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1702 } 1703 extern "C" { 1704 pub fn toupper(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1705 } 1706 extern "C" { 1707 pub fn isblank(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1708 } 1709 extern "C" { 1710 pub fn isascii(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1711 } 1712 extern "C" { 1713 pub fn toascii(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1714 } 1715 extern "C" { 1716 pub fn _toupper(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1717 } 1718 extern "C" { 1719 pub fn _tolower(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 1720 } 1721 #[repr(C)] 1722 #[derive(Debug, Copy, Clone)] 1723 pub struct __locale_struct { 1724 pub __locales: [*mut __locale_data; 13usize], 1725 pub __ctype_b: *const ::std::os::raw::c_ushort, 1726 pub __ctype_tolower: *const ::std::os::raw::c_int, 1727 pub __ctype_toupper: *const ::std::os::raw::c_int, 1728 pub __names: [*const ::std::os::raw::c_char; 13usize], 1729 } 1730 #[test] 1731 fn bindgen_test_layout___locale_struct() { 1732 const UNINIT: ::std::mem::MaybeUninit<__locale_struct> = ::std::mem::MaybeUninit::uninit(); 1733 let ptr = UNINIT.as_ptr(); 1734 assert_eq!( 1735 ::std::mem::size_of::<__locale_struct>(), 1736 232usize, 1737 concat!("Size of: ", stringify!(__locale_struct)) 1738 ); 1739 assert_eq!( 1740 ::std::mem::align_of::<__locale_struct>(), 1741 8usize, 1742 concat!("Alignment of ", stringify!(__locale_struct)) 1743 ); 1744 assert_eq!( 1745 unsafe { ::std::ptr::addr_of!((*ptr).__locales) as usize - ptr as usize }, 1746 0usize, 1747 concat!( 1748 "Offset of field: ", 1749 stringify!(__locale_struct), 1750 "::", 1751 stringify!(__locales) 1752 ) 1753 ); 1754 assert_eq!( 1755 unsafe { ::std::ptr::addr_of!((*ptr).__ctype_b) as usize - ptr as usize }, 1756 104usize, 1757 concat!( 1758 "Offset of field: ", 1759 stringify!(__locale_struct), 1760 "::", 1761 stringify!(__ctype_b) 1762 ) 1763 ); 1764 assert_eq!( 1765 unsafe { ::std::ptr::addr_of!((*ptr).__ctype_tolower) as usize - ptr as usize }, 1766 112usize, 1767 concat!( 1768 "Offset of field: ", 1769 stringify!(__locale_struct), 1770 "::", 1771 stringify!(__ctype_tolower) 1772 ) 1773 ); 1774 assert_eq!( 1775 unsafe { ::std::ptr::addr_of!((*ptr).__ctype_toupper) as usize - ptr as usize }, 1776 120usize, 1777 concat!( 1778 "Offset of field: ", 1779 stringify!(__locale_struct), 1780 "::", 1781 stringify!(__ctype_toupper) 1782 ) 1783 ); 1784 assert_eq!( 1785 unsafe { ::std::ptr::addr_of!((*ptr).__names) as usize - ptr as usize }, 1786 128usize, 1787 concat!( 1788 "Offset of field: ", 1789 stringify!(__locale_struct), 1790 "::", 1791 stringify!(__names) 1792 ) 1793 ); 1794 } 1795 pub type __locale_t = *mut __locale_struct; 1796 pub type locale_t = __locale_t; 1797 extern "C" { 1798 pub fn isalnum_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; 1799 } 1800 extern "C" { 1801 pub fn isalpha_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; 1802 } 1803 extern "C" { 1804 pub fn iscntrl_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; 1805 } 1806 extern "C" { 1807 pub fn isdigit_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; 1808 } 1809 extern "C" { 1810 pub fn islower_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; 1811 } 1812 extern "C" { 1813 pub fn isgraph_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; 1814 } 1815 extern "C" { 1816 pub fn isprint_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; 1817 } 1818 extern "C" { 1819 pub fn ispunct_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; 1820 } 1821 extern "C" { 1822 pub fn isspace_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; 1823 } 1824 extern "C" { 1825 pub fn isupper_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; 1826 } 1827 extern "C" { 1828 pub fn isxdigit_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; 1829 } 1830 extern "C" { 1831 pub fn isblank_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; 1832 } 1833 extern "C" { 1834 pub fn __tolower_l(__c: ::std::os::raw::c_int, __l: locale_t) -> ::std::os::raw::c_int; 1835 } 1836 extern "C" { 1837 pub fn tolower_l(__c: ::std::os::raw::c_int, __l: locale_t) -> ::std::os::raw::c_int; 1838 } 1839 extern "C" { 1840 pub fn __toupper_l(__c: ::std::os::raw::c_int, __l: locale_t) -> ::std::os::raw::c_int; 1841 } 1842 extern "C" { 1843 pub fn toupper_l(__c: ::std::os::raw::c_int, __l: locale_t) -> ::std::os::raw::c_int; 1844 } 1845 extern "C" { 1846 pub fn __assert_fail( 1847 __assertion: *const ::std::os::raw::c_char, 1848 __file: *const ::std::os::raw::c_char, 1849 __line: ::std::os::raw::c_uint, 1850 __function: *const ::std::os::raw::c_char, 1851 ) -> !; 1852 } 1853 extern "C" { 1854 pub fn __assert_perror_fail( 1855 __errnum: ::std::os::raw::c_int, 1856 __file: *const ::std::os::raw::c_char, 1857 __line: ::std::os::raw::c_uint, 1858 __function: *const ::std::os::raw::c_char, 1859 ) -> !; 1860 } 1861 extern "C" { 1862 pub fn __assert( 1863 __assertion: *const ::std::os::raw::c_char, 1864 __file: *const ::std::os::raw::c_char, 1865 __line: ::std::os::raw::c_int, 1866 ) -> !; 1867 } 1868 extern "C" { 1869 pub fn memcpy( 1870 __dest: *mut ::std::os::raw::c_void, 1871 __src: *const ::std::os::raw::c_void, 1872 __n: ::std::os::raw::c_ulong, 1873 ) -> *mut ::std::os::raw::c_void; 1874 } 1875 extern "C" { 1876 pub fn memmove( 1877 __dest: *mut ::std::os::raw::c_void, 1878 __src: *const ::std::os::raw::c_void, 1879 __n: ::std::os::raw::c_ulong, 1880 ) -> *mut ::std::os::raw::c_void; 1881 } 1882 extern "C" { 1883 pub fn memccpy( 1884 __dest: *mut ::std::os::raw::c_void, 1885 __src: *const ::std::os::raw::c_void, 1886 __c: ::std::os::raw::c_int, 1887 __n: ::std::os::raw::c_ulong, 1888 ) -> *mut ::std::os::raw::c_void; 1889 } 1890 extern "C" { 1891 pub fn memset( 1892 __s: *mut ::std::os::raw::c_void, 1893 __c: ::std::os::raw::c_int, 1894 __n: ::std::os::raw::c_ulong, 1895 ) -> *mut ::std::os::raw::c_void; 1896 } 1897 extern "C" { 1898 pub fn memcmp( 1899 __s1: *const ::std::os::raw::c_void, 1900 __s2: *const ::std::os::raw::c_void, 1901 __n: ::std::os::raw::c_ulong, 1902 ) -> ::std::os::raw::c_int; 1903 } 1904 extern "C" { 1905 pub fn __memcmpeq( 1906 __s1: *const ::std::os::raw::c_void, 1907 __s2: *const ::std::os::raw::c_void, 1908 __n: usize, 1909 ) -> ::std::os::raw::c_int; 1910 } 1911 extern "C" { 1912 pub fn memchr( 1913 __s: *const ::std::os::raw::c_void, 1914 __c: ::std::os::raw::c_int, 1915 __n: ::std::os::raw::c_ulong, 1916 ) -> *mut ::std::os::raw::c_void; 1917 } 1918 extern "C" { 1919 pub fn strcpy( 1920 __dest: *mut ::std::os::raw::c_char, 1921 __src: *const ::std::os::raw::c_char, 1922 ) -> *mut ::std::os::raw::c_char; 1923 } 1924 extern "C" { 1925 pub fn strncpy( 1926 __dest: *mut ::std::os::raw::c_char, 1927 __src: *const ::std::os::raw::c_char, 1928 __n: ::std::os::raw::c_ulong, 1929 ) -> *mut ::std::os::raw::c_char; 1930 } 1931 extern "C" { 1932 pub fn strcat( 1933 __dest: *mut ::std::os::raw::c_char, 1934 __src: *const ::std::os::raw::c_char, 1935 ) -> *mut ::std::os::raw::c_char; 1936 } 1937 extern "C" { 1938 pub fn strncat( 1939 __dest: *mut ::std::os::raw::c_char, 1940 __src: *const ::std::os::raw::c_char, 1941 __n: ::std::os::raw::c_ulong, 1942 ) -> *mut ::std::os::raw::c_char; 1943 } 1944 extern "C" { 1945 pub fn strcmp( 1946 __s1: *const ::std::os::raw::c_char, 1947 __s2: *const ::std::os::raw::c_char, 1948 ) -> ::std::os::raw::c_int; 1949 } 1950 extern "C" { 1951 pub fn strncmp( 1952 __s1: *const ::std::os::raw::c_char, 1953 __s2: *const ::std::os::raw::c_char, 1954 __n: ::std::os::raw::c_ulong, 1955 ) -> ::std::os::raw::c_int; 1956 } 1957 extern "C" { 1958 pub fn strcoll( 1959 __s1: *const ::std::os::raw::c_char, 1960 __s2: *const ::std::os::raw::c_char, 1961 ) -> ::std::os::raw::c_int; 1962 } 1963 extern "C" { 1964 pub fn strxfrm( 1965 __dest: *mut ::std::os::raw::c_char, 1966 __src: *const ::std::os::raw::c_char, 1967 __n: ::std::os::raw::c_ulong, 1968 ) -> ::std::os::raw::c_ulong; 1969 } 1970 extern "C" { 1971 pub fn strcoll_l( 1972 __s1: *const ::std::os::raw::c_char, 1973 __s2: *const ::std::os::raw::c_char, 1974 __l: locale_t, 1975 ) -> ::std::os::raw::c_int; 1976 } 1977 extern "C" { 1978 pub fn strxfrm_l( 1979 __dest: *mut ::std::os::raw::c_char, 1980 __src: *const ::std::os::raw::c_char, 1981 __n: usize, 1982 __l: locale_t, 1983 ) -> usize; 1984 } 1985 extern "C" { 1986 pub fn strdup(__s: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; 1987 } 1988 extern "C" { 1989 pub fn strndup( 1990 __string: *const ::std::os::raw::c_char, 1991 __n: ::std::os::raw::c_ulong, 1992 ) -> *mut ::std::os::raw::c_char; 1993 } 1994 extern "C" { 1995 pub fn strchr( 1996 __s: *const ::std::os::raw::c_char, 1997 __c: ::std::os::raw::c_int, 1998 ) -> *mut ::std::os::raw::c_char; 1999 } 2000 extern "C" { 2001 pub fn strrchr( 2002 __s: *const ::std::os::raw::c_char, 2003 __c: ::std::os::raw::c_int, 2004 ) -> *mut ::std::os::raw::c_char; 2005 } 2006 extern "C" { 2007 pub fn strchrnul( 2008 __s: *const ::std::os::raw::c_char, 2009 __c: ::std::os::raw::c_int, 2010 ) -> *mut ::std::os::raw::c_char; 2011 } 2012 extern "C" { 2013 pub fn strcspn( 2014 __s: *const ::std::os::raw::c_char, 2015 __reject: *const ::std::os::raw::c_char, 2016 ) -> ::std::os::raw::c_ulong; 2017 } 2018 extern "C" { 2019 pub fn strspn( 2020 __s: *const ::std::os::raw::c_char, 2021 __accept: *const ::std::os::raw::c_char, 2022 ) -> ::std::os::raw::c_ulong; 2023 } 2024 extern "C" { 2025 pub fn strpbrk( 2026 __s: *const ::std::os::raw::c_char, 2027 __accept: *const ::std::os::raw::c_char, 2028 ) -> *mut ::std::os::raw::c_char; 2029 } 2030 extern "C" { 2031 pub fn strstr( 2032 __haystack: *const ::std::os::raw::c_char, 2033 __needle: *const ::std::os::raw::c_char, 2034 ) -> *mut ::std::os::raw::c_char; 2035 } 2036 extern "C" { 2037 pub fn strtok( 2038 __s: *mut ::std::os::raw::c_char, 2039 __delim: *const ::std::os::raw::c_char, 2040 ) -> *mut ::std::os::raw::c_char; 2041 } 2042 extern "C" { 2043 pub fn __strtok_r( 2044 __s: *mut ::std::os::raw::c_char, 2045 __delim: *const ::std::os::raw::c_char, 2046 __save_ptr: *mut *mut ::std::os::raw::c_char, 2047 ) -> *mut ::std::os::raw::c_char; 2048 } 2049 extern "C" { 2050 pub fn strtok_r( 2051 __s: *mut ::std::os::raw::c_char, 2052 __delim: *const ::std::os::raw::c_char, 2053 __save_ptr: *mut *mut ::std::os::raw::c_char, 2054 ) -> *mut ::std::os::raw::c_char; 2055 } 2056 extern "C" { 2057 pub fn strcasestr( 2058 __haystack: *const ::std::os::raw::c_char, 2059 __needle: *const ::std::os::raw::c_char, 2060 ) -> *mut ::std::os::raw::c_char; 2061 } 2062 extern "C" { 2063 pub fn memmem( 2064 __haystack: *const ::std::os::raw::c_void, 2065 __haystacklen: usize, 2066 __needle: *const ::std::os::raw::c_void, 2067 __needlelen: usize, 2068 ) -> *mut ::std::os::raw::c_void; 2069 } 2070 extern "C" { 2071 pub fn __mempcpy( 2072 __dest: *mut ::std::os::raw::c_void, 2073 __src: *const ::std::os::raw::c_void, 2074 __n: usize, 2075 ) -> *mut ::std::os::raw::c_void; 2076 } 2077 extern "C" { 2078 pub fn mempcpy( 2079 __dest: *mut ::std::os::raw::c_void, 2080 __src: *const ::std::os::raw::c_void, 2081 __n: ::std::os::raw::c_ulong, 2082 ) -> *mut ::std::os::raw::c_void; 2083 } 2084 extern "C" { 2085 pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; 2086 } 2087 extern "C" { 2088 pub fn strnlen(__string: *const ::std::os::raw::c_char, __maxlen: usize) -> usize; 2089 } 2090 extern "C" { 2091 pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; 2092 } 2093 extern "C" { 2094 #[link_name = "\u{1}__xpg_strerror_r"] 2095 pub fn strerror_r( 2096 __errnum: ::std::os::raw::c_int, 2097 __buf: *mut ::std::os::raw::c_char, 2098 __buflen: usize, 2099 ) -> ::std::os::raw::c_int; 2100 } 2101 extern "C" { 2102 pub fn strerror_l( 2103 __errnum: ::std::os::raw::c_int, 2104 __l: locale_t, 2105 ) -> *mut ::std::os::raw::c_char; 2106 } 2107 extern "C" { 2108 pub fn bcmp( 2109 __s1: *const ::std::os::raw::c_void, 2110 __s2: *const ::std::os::raw::c_void, 2111 __n: ::std::os::raw::c_ulong, 2112 ) -> ::std::os::raw::c_int; 2113 } 2114 extern "C" { 2115 pub fn bcopy( 2116 __src: *const ::std::os::raw::c_void, 2117 __dest: *mut ::std::os::raw::c_void, 2118 __n: ::std::os::raw::c_ulong, 2119 ); 2120 } 2121 extern "C" { 2122 pub fn bzero(__s: *mut ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong); 2123 } 2124 extern "C" { 2125 pub fn index( 2126 __s: *const ::std::os::raw::c_char, 2127 __c: ::std::os::raw::c_int, 2128 ) -> *mut ::std::os::raw::c_char; 2129 } 2130 extern "C" { 2131 pub fn rindex( 2132 __s: *const ::std::os::raw::c_char, 2133 __c: ::std::os::raw::c_int, 2134 ) -> *mut ::std::os::raw::c_char; 2135 } 2136 extern "C" { 2137 pub fn ffs(__i: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 2138 } 2139 extern "C" { 2140 pub fn ffsl(__l: ::std::os::raw::c_long) -> ::std::os::raw::c_int; 2141 } 2142 extern "C" { 2143 pub fn ffsll(__ll: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int; 2144 } 2145 extern "C" { 2146 pub fn strcasecmp( 2147 __s1: *const ::std::os::raw::c_char, 2148 __s2: *const ::std::os::raw::c_char, 2149 ) -> ::std::os::raw::c_int; 2150 } 2151 extern "C" { 2152 pub fn strncasecmp( 2153 __s1: *const ::std::os::raw::c_char, 2154 __s2: *const ::std::os::raw::c_char, 2155 __n: ::std::os::raw::c_ulong, 2156 ) -> ::std::os::raw::c_int; 2157 } 2158 extern "C" { 2159 pub fn strcasecmp_l( 2160 __s1: *const ::std::os::raw::c_char, 2161 __s2: *const ::std::os::raw::c_char, 2162 __loc: locale_t, 2163 ) -> ::std::os::raw::c_int; 2164 } 2165 extern "C" { 2166 pub fn strncasecmp_l( 2167 __s1: *const ::std::os::raw::c_char, 2168 __s2: *const ::std::os::raw::c_char, 2169 __n: usize, 2170 __loc: locale_t, 2171 ) -> ::std::os::raw::c_int; 2172 } 2173 extern "C" { 2174 pub fn explicit_bzero(__s: *mut ::std::os::raw::c_void, __n: usize); 2175 } 2176 extern "C" { 2177 pub fn strsep( 2178 __stringp: *mut *mut ::std::os::raw::c_char, 2179 __delim: *const ::std::os::raw::c_char, 2180 ) -> *mut ::std::os::raw::c_char; 2181 } 2182 extern "C" { 2183 pub fn strsignal(__sig: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; 2184 } 2185 extern "C" { 2186 pub fn __stpcpy( 2187 __dest: *mut ::std::os::raw::c_char, 2188 __src: *const ::std::os::raw::c_char, 2189 ) -> *mut ::std::os::raw::c_char; 2190 } 2191 extern "C" { 2192 pub fn stpcpy( 2193 __dest: *mut ::std::os::raw::c_char, 2194 __src: *const ::std::os::raw::c_char, 2195 ) -> *mut ::std::os::raw::c_char; 2196 } 2197 extern "C" { 2198 pub fn __stpncpy( 2199 __dest: *mut ::std::os::raw::c_char, 2200 __src: *const ::std::os::raw::c_char, 2201 __n: usize, 2202 ) -> *mut ::std::os::raw::c_char; 2203 } 2204 extern "C" { 2205 pub fn stpncpy( 2206 __dest: *mut ::std::os::raw::c_char, 2207 __src: *const ::std::os::raw::c_char, 2208 __n: ::std::os::raw::c_ulong, 2209 ) -> *mut ::std::os::raw::c_char; 2210 } 2211 extern "C" { 2212 pub fn strlcpy( 2213 __dest: *mut ::std::os::raw::c_char, 2214 __src: *const ::std::os::raw::c_char, 2215 __n: ::std::os::raw::c_ulong, 2216 ) -> ::std::os::raw::c_ulong; 2217 } 2218 extern "C" { 2219 pub fn strlcat( 2220 __dest: *mut ::std::os::raw::c_char, 2221 __src: *const ::std::os::raw::c_char, 2222 __n: ::std::os::raw::c_ulong, 2223 ) -> ::std::os::raw::c_ulong; 2224 } 2225 #[repr(C)] 2226 #[derive(Debug, Copy, Clone)] 2227 pub struct cursor { 2228 pub start: *mut ::std::os::raw::c_uchar, 2229 pub p: *mut ::std::os::raw::c_uchar, 2230 pub end: *mut ::std::os::raw::c_uchar, 2231 } 2232 #[test] 2233 fn bindgen_test_layout_cursor() { 2234 const UNINIT: ::std::mem::MaybeUninit<cursor> = ::std::mem::MaybeUninit::uninit(); 2235 let ptr = UNINIT.as_ptr(); 2236 assert_eq!( 2237 ::std::mem::size_of::<cursor>(), 2238 24usize, 2239 concat!("Size of: ", stringify!(cursor)) 2240 ); 2241 assert_eq!( 2242 ::std::mem::align_of::<cursor>(), 2243 8usize, 2244 concat!("Alignment of ", stringify!(cursor)) 2245 ); 2246 assert_eq!( 2247 unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, 2248 0usize, 2249 concat!( 2250 "Offset of field: ", 2251 stringify!(cursor), 2252 "::", 2253 stringify!(start) 2254 ) 2255 ); 2256 assert_eq!( 2257 unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, 2258 8usize, 2259 concat!("Offset of field: ", stringify!(cursor), "::", stringify!(p)) 2260 ); 2261 assert_eq!( 2262 unsafe { ::std::ptr::addr_of!((*ptr).end) as usize - ptr as usize }, 2263 16usize, 2264 concat!( 2265 "Offset of field: ", 2266 stringify!(cursor), 2267 "::", 2268 stringify!(end) 2269 ) 2270 ); 2271 } 2272 #[repr(C)] 2273 #[derive(Debug, Copy, Clone)] 2274 pub struct ndb_str_block { 2275 pub str_: *const ::std::os::raw::c_char, 2276 pub len: u32, 2277 } 2278 #[test] 2279 fn bindgen_test_layout_ndb_str_block() { 2280 const UNINIT: ::std::mem::MaybeUninit<ndb_str_block> = ::std::mem::MaybeUninit::uninit(); 2281 let ptr = UNINIT.as_ptr(); 2282 assert_eq!( 2283 ::std::mem::size_of::<ndb_str_block>(), 2284 16usize, 2285 concat!("Size of: ", stringify!(ndb_str_block)) 2286 ); 2287 assert_eq!( 2288 ::std::mem::align_of::<ndb_str_block>(), 2289 8usize, 2290 concat!("Alignment of ", stringify!(ndb_str_block)) 2291 ); 2292 assert_eq!( 2293 unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize }, 2294 0usize, 2295 concat!( 2296 "Offset of field: ", 2297 stringify!(ndb_str_block), 2298 "::", 2299 stringify!(str_) 2300 ) 2301 ); 2302 assert_eq!( 2303 unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, 2304 8usize, 2305 concat!( 2306 "Offset of field: ", 2307 stringify!(ndb_str_block), 2308 "::", 2309 stringify!(len) 2310 ) 2311 ); 2312 } 2313 pub type str_block_t = ndb_str_block; 2314 #[repr(C)] 2315 #[derive(Debug, Copy, Clone)] 2316 pub struct ndb_json_parser { 2317 _unused: [u8; 0], 2318 } 2319 #[repr(C)] 2320 #[derive(Debug, Copy, Clone)] 2321 pub struct ndb { 2322 _unused: [u8; 0], 2323 } 2324 #[repr(C)] 2325 #[derive(Debug, Copy, Clone)] 2326 pub struct ndb_blocks { 2327 _unused: [u8; 0], 2328 } 2329 #[repr(C)] 2330 #[derive(Debug, Copy, Clone)] 2331 pub struct ndb_note { 2332 _unused: [u8; 0], 2333 } 2334 #[repr(C)] 2335 #[derive(Debug, Copy, Clone)] 2336 pub struct ndb_tag { 2337 _unused: [u8; 0], 2338 } 2339 #[repr(C)] 2340 #[derive(Debug, Copy, Clone)] 2341 pub struct ndb_tags { 2342 _unused: [u8; 0], 2343 } 2344 #[repr(C)] 2345 #[derive(Debug, Copy, Clone)] 2346 pub struct ndb_lmdb { 2347 _unused: [u8; 0], 2348 } 2349 #[repr(C)] 2350 #[derive(Copy, Clone)] 2351 pub struct ndb_packed_str { 2352 _unused: [u8; 0], 2353 } 2354 #[repr(C)] 2355 #[derive(Debug, Copy, Clone)] 2356 pub struct bolt11 { 2357 _unused: [u8; 0], 2358 } 2359 pub const ndb_metadata_type_NDB_NOTE_META_RESERVED: ndb_metadata_type = 0; 2360 pub const ndb_metadata_type_NDB_NOTE_META_COUNTS: ndb_metadata_type = 100; 2361 pub const ndb_metadata_type_NDB_NOTE_META_REACTION: ndb_metadata_type = 200; 2362 pub type ndb_metadata_type = ::std::os::raw::c_uint; 2363 #[repr(C)] 2364 #[derive(Debug, Copy, Clone)] 2365 pub struct ndb_tag_ptr { 2366 pub ptr: *mut ndb_tag, 2367 } 2368 #[test] 2369 fn bindgen_test_layout_ndb_tag_ptr() { 2370 const UNINIT: ::std::mem::MaybeUninit<ndb_tag_ptr> = ::std::mem::MaybeUninit::uninit(); 2371 let ptr = UNINIT.as_ptr(); 2372 assert_eq!( 2373 ::std::mem::size_of::<ndb_tag_ptr>(), 2374 8usize, 2375 concat!("Size of: ", stringify!(ndb_tag_ptr)) 2376 ); 2377 assert_eq!( 2378 ::std::mem::align_of::<ndb_tag_ptr>(), 2379 8usize, 2380 concat!("Alignment of ", stringify!(ndb_tag_ptr)) 2381 ); 2382 assert_eq!( 2383 unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, 2384 0usize, 2385 concat!( 2386 "Offset of field: ", 2387 stringify!(ndb_tag_ptr), 2388 "::", 2389 stringify!(ptr) 2390 ) 2391 ); 2392 } 2393 #[repr(C)] 2394 #[derive(Debug, Copy, Clone)] 2395 pub struct ndb_tags_ptr { 2396 pub ptr: *mut ndb_tags, 2397 } 2398 #[test] 2399 fn bindgen_test_layout_ndb_tags_ptr() { 2400 const UNINIT: ::std::mem::MaybeUninit<ndb_tags_ptr> = ::std::mem::MaybeUninit::uninit(); 2401 let ptr = UNINIT.as_ptr(); 2402 assert_eq!( 2403 ::std::mem::size_of::<ndb_tags_ptr>(), 2404 8usize, 2405 concat!("Size of: ", stringify!(ndb_tags_ptr)) 2406 ); 2407 assert_eq!( 2408 ::std::mem::align_of::<ndb_tags_ptr>(), 2409 8usize, 2410 concat!("Alignment of ", stringify!(ndb_tags_ptr)) 2411 ); 2412 assert_eq!( 2413 unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, 2414 0usize, 2415 concat!( 2416 "Offset of field: ", 2417 stringify!(ndb_tags_ptr), 2418 "::", 2419 stringify!(ptr) 2420 ) 2421 ); 2422 } 2423 #[repr(C)] 2424 #[derive(Debug, Copy, Clone)] 2425 pub struct ndb_block_ptr { 2426 pub ptr: *mut ndb_block, 2427 } 2428 #[test] 2429 fn bindgen_test_layout_ndb_block_ptr() { 2430 const UNINIT: ::std::mem::MaybeUninit<ndb_block_ptr> = ::std::mem::MaybeUninit::uninit(); 2431 let ptr = UNINIT.as_ptr(); 2432 assert_eq!( 2433 ::std::mem::size_of::<ndb_block_ptr>(), 2434 8usize, 2435 concat!("Size of: ", stringify!(ndb_block_ptr)) 2436 ); 2437 assert_eq!( 2438 ::std::mem::align_of::<ndb_block_ptr>(), 2439 8usize, 2440 concat!("Alignment of ", stringify!(ndb_block_ptr)) 2441 ); 2442 assert_eq!( 2443 unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, 2444 0usize, 2445 concat!( 2446 "Offset of field: ", 2447 stringify!(ndb_block_ptr), 2448 "::", 2449 stringify!(ptr) 2450 ) 2451 ); 2452 } 2453 #[repr(C)] 2454 #[derive(Debug, Copy, Clone)] 2455 pub struct ndb_blocks_ptr { 2456 pub ptr: *mut ndb_blocks, 2457 } 2458 #[test] 2459 fn bindgen_test_layout_ndb_blocks_ptr() { 2460 const UNINIT: ::std::mem::MaybeUninit<ndb_blocks_ptr> = ::std::mem::MaybeUninit::uninit(); 2461 let ptr = UNINIT.as_ptr(); 2462 assert_eq!( 2463 ::std::mem::size_of::<ndb_blocks_ptr>(), 2464 8usize, 2465 concat!("Size of: ", stringify!(ndb_blocks_ptr)) 2466 ); 2467 assert_eq!( 2468 ::std::mem::align_of::<ndb_blocks_ptr>(), 2469 8usize, 2470 concat!("Alignment of ", stringify!(ndb_blocks_ptr)) 2471 ); 2472 assert_eq!( 2473 unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, 2474 0usize, 2475 concat!( 2476 "Offset of field: ", 2477 stringify!(ndb_blocks_ptr), 2478 "::", 2479 stringify!(ptr) 2480 ) 2481 ); 2482 } 2483 #[repr(C)] 2484 #[derive(Debug, Copy, Clone)] 2485 pub struct ndb_note_ptr { 2486 pub ptr: *mut ndb_note, 2487 } 2488 #[test] 2489 fn bindgen_test_layout_ndb_note_ptr() { 2490 const UNINIT: ::std::mem::MaybeUninit<ndb_note_ptr> = ::std::mem::MaybeUninit::uninit(); 2491 let ptr = UNINIT.as_ptr(); 2492 assert_eq!( 2493 ::std::mem::size_of::<ndb_note_ptr>(), 2494 8usize, 2495 concat!("Size of: ", stringify!(ndb_note_ptr)) 2496 ); 2497 assert_eq!( 2498 ::std::mem::align_of::<ndb_note_ptr>(), 2499 8usize, 2500 concat!("Alignment of ", stringify!(ndb_note_ptr)) 2501 ); 2502 assert_eq!( 2503 unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, 2504 0usize, 2505 concat!( 2506 "Offset of field: ", 2507 stringify!(ndb_note_ptr), 2508 "::", 2509 stringify!(ptr) 2510 ) 2511 ); 2512 } 2513 #[repr(C)] 2514 #[derive(Debug, Copy, Clone)] 2515 pub struct ndb_t { 2516 pub ndb: *mut ndb, 2517 } 2518 #[test] 2519 fn bindgen_test_layout_ndb_t() { 2520 const UNINIT: ::std::mem::MaybeUninit<ndb_t> = ::std::mem::MaybeUninit::uninit(); 2521 let ptr = UNINIT.as_ptr(); 2522 assert_eq!( 2523 ::std::mem::size_of::<ndb_t>(), 2524 8usize, 2525 concat!("Size of: ", stringify!(ndb_t)) 2526 ); 2527 assert_eq!( 2528 ::std::mem::align_of::<ndb_t>(), 2529 8usize, 2530 concat!("Alignment of ", stringify!(ndb_t)) 2531 ); 2532 assert_eq!( 2533 unsafe { ::std::ptr::addr_of!((*ptr).ndb) as usize - ptr as usize }, 2534 0usize, 2535 concat!( 2536 "Offset of field: ", 2537 stringify!(ndb_t), 2538 "::", 2539 stringify!(ndb) 2540 ) 2541 ); 2542 } 2543 #[repr(C)] 2544 #[derive(Copy, Clone)] 2545 pub union ndb_reaction_str { 2546 pub binmoji: u64, 2547 pub packed: ndb_reaction_str__bindgen_ty_1, 2548 } 2549 #[repr(C)] 2550 #[derive(Debug, Copy, Clone)] 2551 pub struct ndb_reaction_str__bindgen_ty_1 { 2552 pub flag: u8, 2553 pub str_: [::std::os::raw::c_char; 7usize], 2554 } 2555 #[test] 2556 fn bindgen_test_layout_ndb_reaction_str__bindgen_ty_1() { 2557 const UNINIT: ::std::mem::MaybeUninit<ndb_reaction_str__bindgen_ty_1> = 2558 ::std::mem::MaybeUninit::uninit(); 2559 let ptr = UNINIT.as_ptr(); 2560 assert_eq!( 2561 ::std::mem::size_of::<ndb_reaction_str__bindgen_ty_1>(), 2562 8usize, 2563 concat!("Size of: ", stringify!(ndb_reaction_str__bindgen_ty_1)) 2564 ); 2565 assert_eq!( 2566 ::std::mem::align_of::<ndb_reaction_str__bindgen_ty_1>(), 2567 1usize, 2568 concat!("Alignment of ", stringify!(ndb_reaction_str__bindgen_ty_1)) 2569 ); 2570 assert_eq!( 2571 unsafe { ::std::ptr::addr_of!((*ptr).flag) as usize - ptr as usize }, 2572 0usize, 2573 concat!( 2574 "Offset of field: ", 2575 stringify!(ndb_reaction_str__bindgen_ty_1), 2576 "::", 2577 stringify!(flag) 2578 ) 2579 ); 2580 assert_eq!( 2581 unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize }, 2582 1usize, 2583 concat!( 2584 "Offset of field: ", 2585 stringify!(ndb_reaction_str__bindgen_ty_1), 2586 "::", 2587 stringify!(str_) 2588 ) 2589 ); 2590 } 2591 #[test] 2592 fn bindgen_test_layout_ndb_reaction_str() { 2593 const UNINIT: ::std::mem::MaybeUninit<ndb_reaction_str> = ::std::mem::MaybeUninit::uninit(); 2594 let ptr = UNINIT.as_ptr(); 2595 assert_eq!( 2596 ::std::mem::size_of::<ndb_reaction_str>(), 2597 8usize, 2598 concat!("Size of: ", stringify!(ndb_reaction_str)) 2599 ); 2600 assert_eq!( 2601 ::std::mem::align_of::<ndb_reaction_str>(), 2602 8usize, 2603 concat!("Alignment of ", stringify!(ndb_reaction_str)) 2604 ); 2605 assert_eq!( 2606 unsafe { ::std::ptr::addr_of!((*ptr).binmoji) as usize - ptr as usize }, 2607 0usize, 2608 concat!( 2609 "Offset of field: ", 2610 stringify!(ndb_reaction_str), 2611 "::", 2612 stringify!(binmoji) 2613 ) 2614 ); 2615 assert_eq!( 2616 unsafe { ::std::ptr::addr_of!((*ptr).packed) as usize - ptr as usize }, 2617 0usize, 2618 concat!( 2619 "Offset of field: ", 2620 stringify!(ndb_reaction_str), 2621 "::", 2622 stringify!(packed) 2623 ) 2624 ); 2625 } 2626 pub type static_assert_reaction_string_must_be_8_bytes = [::std::os::raw::c_char; 1usize]; 2627 #[repr(C)] 2628 #[derive(Debug, Copy, Clone)] 2629 pub struct ndb_note_meta_builder { 2630 pub cursor: cursor, 2631 } 2632 #[test] 2633 fn bindgen_test_layout_ndb_note_meta_builder() { 2634 const UNINIT: ::std::mem::MaybeUninit<ndb_note_meta_builder> = 2635 ::std::mem::MaybeUninit::uninit(); 2636 let ptr = UNINIT.as_ptr(); 2637 assert_eq!( 2638 ::std::mem::size_of::<ndb_note_meta_builder>(), 2639 24usize, 2640 concat!("Size of: ", stringify!(ndb_note_meta_builder)) 2641 ); 2642 assert_eq!( 2643 ::std::mem::align_of::<ndb_note_meta_builder>(), 2644 8usize, 2645 concat!("Alignment of ", stringify!(ndb_note_meta_builder)) 2646 ); 2647 assert_eq!( 2648 unsafe { ::std::ptr::addr_of!((*ptr).cursor) as usize - ptr as usize }, 2649 0usize, 2650 concat!( 2651 "Offset of field: ", 2652 stringify!(ndb_note_meta_builder), 2653 "::", 2654 stringify!(cursor) 2655 ) 2656 ); 2657 } 2658 #[repr(C)] 2659 #[derive(Copy, Clone)] 2660 pub struct ndb_str { 2661 pub flag: ::std::os::raw::c_uchar, 2662 pub __bindgen_anon_1: ndb_str__bindgen_ty_1, 2663 } 2664 #[repr(C)] 2665 #[derive(Copy, Clone)] 2666 pub union ndb_str__bindgen_ty_1 { 2667 pub str_: *const ::std::os::raw::c_char, 2668 pub id: *mut ::std::os::raw::c_uchar, 2669 } 2670 #[test] 2671 fn bindgen_test_layout_ndb_str__bindgen_ty_1() { 2672 const UNINIT: ::std::mem::MaybeUninit<ndb_str__bindgen_ty_1> = 2673 ::std::mem::MaybeUninit::uninit(); 2674 let ptr = UNINIT.as_ptr(); 2675 assert_eq!( 2676 ::std::mem::size_of::<ndb_str__bindgen_ty_1>(), 2677 8usize, 2678 concat!("Size of: ", stringify!(ndb_str__bindgen_ty_1)) 2679 ); 2680 assert_eq!( 2681 ::std::mem::align_of::<ndb_str__bindgen_ty_1>(), 2682 8usize, 2683 concat!("Alignment of ", stringify!(ndb_str__bindgen_ty_1)) 2684 ); 2685 assert_eq!( 2686 unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize }, 2687 0usize, 2688 concat!( 2689 "Offset of field: ", 2690 stringify!(ndb_str__bindgen_ty_1), 2691 "::", 2692 stringify!(str_) 2693 ) 2694 ); 2695 assert_eq!( 2696 unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 2697 0usize, 2698 concat!( 2699 "Offset of field: ", 2700 stringify!(ndb_str__bindgen_ty_1), 2701 "::", 2702 stringify!(id) 2703 ) 2704 ); 2705 } 2706 #[test] 2707 fn bindgen_test_layout_ndb_str() { 2708 const UNINIT: ::std::mem::MaybeUninit<ndb_str> = ::std::mem::MaybeUninit::uninit(); 2709 let ptr = UNINIT.as_ptr(); 2710 assert_eq!( 2711 ::std::mem::size_of::<ndb_str>(), 2712 16usize, 2713 concat!("Size of: ", stringify!(ndb_str)) 2714 ); 2715 assert_eq!( 2716 ::std::mem::align_of::<ndb_str>(), 2717 8usize, 2718 concat!("Alignment of ", stringify!(ndb_str)) 2719 ); 2720 assert_eq!( 2721 unsafe { ::std::ptr::addr_of!((*ptr).flag) as usize - ptr as usize }, 2722 0usize, 2723 concat!( 2724 "Offset of field: ", 2725 stringify!(ndb_str), 2726 "::", 2727 stringify!(flag) 2728 ) 2729 ); 2730 } 2731 #[repr(C)] 2732 #[derive(Debug, Copy, Clone)] 2733 pub struct ndb_ingest_meta { 2734 pub client: ::std::os::raw::c_uint, 2735 pub relay: *const ::std::os::raw::c_char, 2736 } 2737 #[test] 2738 fn bindgen_test_layout_ndb_ingest_meta() { 2739 const UNINIT: ::std::mem::MaybeUninit<ndb_ingest_meta> = ::std::mem::MaybeUninit::uninit(); 2740 let ptr = UNINIT.as_ptr(); 2741 assert_eq!( 2742 ::std::mem::size_of::<ndb_ingest_meta>(), 2743 16usize, 2744 concat!("Size of: ", stringify!(ndb_ingest_meta)) 2745 ); 2746 assert_eq!( 2747 ::std::mem::align_of::<ndb_ingest_meta>(), 2748 8usize, 2749 concat!("Alignment of ", stringify!(ndb_ingest_meta)) 2750 ); 2751 assert_eq!( 2752 unsafe { ::std::ptr::addr_of!((*ptr).client) as usize - ptr as usize }, 2753 0usize, 2754 concat!( 2755 "Offset of field: ", 2756 stringify!(ndb_ingest_meta), 2757 "::", 2758 stringify!(client) 2759 ) 2760 ); 2761 assert_eq!( 2762 unsafe { ::std::ptr::addr_of!((*ptr).relay) as usize - ptr as usize }, 2763 8usize, 2764 concat!( 2765 "Offset of field: ", 2766 stringify!(ndb_ingest_meta), 2767 "::", 2768 stringify!(relay) 2769 ) 2770 ); 2771 } 2772 #[repr(C)] 2773 #[derive(Debug, Copy, Clone)] 2774 pub struct ndb_keypair { 2775 pub pubkey: [::std::os::raw::c_uchar; 32usize], 2776 pub secret: [::std::os::raw::c_uchar; 32usize], 2777 pub pair: [::std::os::raw::c_uchar; 96usize], 2778 } 2779 #[test] 2780 fn bindgen_test_layout_ndb_keypair() { 2781 const UNINIT: ::std::mem::MaybeUninit<ndb_keypair> = ::std::mem::MaybeUninit::uninit(); 2782 let ptr = UNINIT.as_ptr(); 2783 assert_eq!( 2784 ::std::mem::size_of::<ndb_keypair>(), 2785 160usize, 2786 concat!("Size of: ", stringify!(ndb_keypair)) 2787 ); 2788 assert_eq!( 2789 ::std::mem::align_of::<ndb_keypair>(), 2790 1usize, 2791 concat!("Alignment of ", stringify!(ndb_keypair)) 2792 ); 2793 assert_eq!( 2794 unsafe { ::std::ptr::addr_of!((*ptr).pubkey) as usize - ptr as usize }, 2795 0usize, 2796 concat!( 2797 "Offset of field: ", 2798 stringify!(ndb_keypair), 2799 "::", 2800 stringify!(pubkey) 2801 ) 2802 ); 2803 assert_eq!( 2804 unsafe { ::std::ptr::addr_of!((*ptr).secret) as usize - ptr as usize }, 2805 32usize, 2806 concat!( 2807 "Offset of field: ", 2808 stringify!(ndb_keypair), 2809 "::", 2810 stringify!(secret) 2811 ) 2812 ); 2813 assert_eq!( 2814 unsafe { ::std::ptr::addr_of!((*ptr).pair) as usize - ptr as usize }, 2815 64usize, 2816 concat!( 2817 "Offset of field: ", 2818 stringify!(ndb_keypair), 2819 "::", 2820 stringify!(pair) 2821 ) 2822 ); 2823 } 2824 pub type ndb_idres = i32; 2825 pub type ndb_id_fn = ::std::option::Option< 2826 unsafe extern "C" fn( 2827 arg1: *mut ::std::os::raw::c_void, 2828 arg2: *const ::std::os::raw::c_char, 2829 ) -> ndb_idres, 2830 >; 2831 pub type ndb_sub_fn = 2832 ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, subid: u64)>; 2833 #[repr(C)] 2834 #[derive(Debug, Copy, Clone)] 2835 pub struct ndb_id_cb { 2836 pub fn_: ndb_id_fn, 2837 pub data: *mut ::std::os::raw::c_void, 2838 } 2839 #[test] 2840 fn bindgen_test_layout_ndb_id_cb() { 2841 const UNINIT: ::std::mem::MaybeUninit<ndb_id_cb> = ::std::mem::MaybeUninit::uninit(); 2842 let ptr = UNINIT.as_ptr(); 2843 assert_eq!( 2844 ::std::mem::size_of::<ndb_id_cb>(), 2845 16usize, 2846 concat!("Size of: ", stringify!(ndb_id_cb)) 2847 ); 2848 assert_eq!( 2849 ::std::mem::align_of::<ndb_id_cb>(), 2850 8usize, 2851 concat!("Alignment of ", stringify!(ndb_id_cb)) 2852 ); 2853 assert_eq!( 2854 unsafe { ::std::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize }, 2855 0usize, 2856 concat!( 2857 "Offset of field: ", 2858 stringify!(ndb_id_cb), 2859 "::", 2860 stringify!(fn_) 2861 ) 2862 ); 2863 assert_eq!( 2864 unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 2865 8usize, 2866 concat!( 2867 "Offset of field: ", 2868 stringify!(ndb_id_cb), 2869 "::", 2870 stringify!(data) 2871 ) 2872 ); 2873 } 2874 #[repr(C)] 2875 #[derive(Debug, Copy, Clone)] 2876 pub struct ndb_txn { 2877 pub lmdb: *mut ndb_lmdb, 2878 pub mdb_txn: *mut ::std::os::raw::c_void, 2879 } 2880 #[test] 2881 fn bindgen_test_layout_ndb_txn() { 2882 const UNINIT: ::std::mem::MaybeUninit<ndb_txn> = ::std::mem::MaybeUninit::uninit(); 2883 let ptr = UNINIT.as_ptr(); 2884 assert_eq!( 2885 ::std::mem::size_of::<ndb_txn>(), 2886 16usize, 2887 concat!("Size of: ", stringify!(ndb_txn)) 2888 ); 2889 assert_eq!( 2890 ::std::mem::align_of::<ndb_txn>(), 2891 8usize, 2892 concat!("Alignment of ", stringify!(ndb_txn)) 2893 ); 2894 assert_eq!( 2895 unsafe { ::std::ptr::addr_of!((*ptr).lmdb) as usize - ptr as usize }, 2896 0usize, 2897 concat!( 2898 "Offset of field: ", 2899 stringify!(ndb_txn), 2900 "::", 2901 stringify!(lmdb) 2902 ) 2903 ); 2904 assert_eq!( 2905 unsafe { ::std::ptr::addr_of!((*ptr).mdb_txn) as usize - ptr as usize }, 2906 8usize, 2907 concat!( 2908 "Offset of field: ", 2909 stringify!(ndb_txn), 2910 "::", 2911 stringify!(mdb_txn) 2912 ) 2913 ); 2914 } 2915 #[repr(C)] 2916 #[derive(Debug, Copy, Clone)] 2917 pub struct ndb_event { 2918 pub note: *mut ndb_note, 2919 } 2920 #[test] 2921 fn bindgen_test_layout_ndb_event() { 2922 const UNINIT: ::std::mem::MaybeUninit<ndb_event> = ::std::mem::MaybeUninit::uninit(); 2923 let ptr = UNINIT.as_ptr(); 2924 assert_eq!( 2925 ::std::mem::size_of::<ndb_event>(), 2926 8usize, 2927 concat!("Size of: ", stringify!(ndb_event)) 2928 ); 2929 assert_eq!( 2930 ::std::mem::align_of::<ndb_event>(), 2931 8usize, 2932 concat!("Alignment of ", stringify!(ndb_event)) 2933 ); 2934 assert_eq!( 2935 unsafe { ::std::ptr::addr_of!((*ptr).note) as usize - ptr as usize }, 2936 0usize, 2937 concat!( 2938 "Offset of field: ", 2939 stringify!(ndb_event), 2940 "::", 2941 stringify!(note) 2942 ) 2943 ); 2944 } 2945 #[repr(C)] 2946 #[derive(Debug, Copy, Clone)] 2947 pub struct ndb_command_result { 2948 pub ok: ::std::os::raw::c_int, 2949 pub msg: *const ::std::os::raw::c_char, 2950 pub msglen: ::std::os::raw::c_int, 2951 } 2952 #[test] 2953 fn bindgen_test_layout_ndb_command_result() { 2954 const UNINIT: ::std::mem::MaybeUninit<ndb_command_result> = ::std::mem::MaybeUninit::uninit(); 2955 let ptr = UNINIT.as_ptr(); 2956 assert_eq!( 2957 ::std::mem::size_of::<ndb_command_result>(), 2958 24usize, 2959 concat!("Size of: ", stringify!(ndb_command_result)) 2960 ); 2961 assert_eq!( 2962 ::std::mem::align_of::<ndb_command_result>(), 2963 8usize, 2964 concat!("Alignment of ", stringify!(ndb_command_result)) 2965 ); 2966 assert_eq!( 2967 unsafe { ::std::ptr::addr_of!((*ptr).ok) as usize - ptr as usize }, 2968 0usize, 2969 concat!( 2970 "Offset of field: ", 2971 stringify!(ndb_command_result), 2972 "::", 2973 stringify!(ok) 2974 ) 2975 ); 2976 assert_eq!( 2977 unsafe { ::std::ptr::addr_of!((*ptr).msg) as usize - ptr as usize }, 2978 8usize, 2979 concat!( 2980 "Offset of field: ", 2981 stringify!(ndb_command_result), 2982 "::", 2983 stringify!(msg) 2984 ) 2985 ); 2986 assert_eq!( 2987 unsafe { ::std::ptr::addr_of!((*ptr).msglen) as usize - ptr as usize }, 2988 16usize, 2989 concat!( 2990 "Offset of field: ", 2991 stringify!(ndb_command_result), 2992 "::", 2993 stringify!(msglen) 2994 ) 2995 ); 2996 } 2997 pub const fce_type_NDB_FCE_EVENT: fce_type = 1; 2998 pub type fce_type = ::std::os::raw::c_uint; 2999 pub const tce_type_NDB_TCE_EVENT: tce_type = 1; 3000 pub const tce_type_NDB_TCE_OK: tce_type = 2; 3001 pub const tce_type_NDB_TCE_NOTICE: tce_type = 3; 3002 pub const tce_type_NDB_TCE_EOSE: tce_type = 4; 3003 pub const tce_type_NDB_TCE_AUTH: tce_type = 5; 3004 pub type tce_type = ::std::os::raw::c_uint; 3005 pub const ndb_ingest_filter_action_NDB_INGEST_REJECT: ndb_ingest_filter_action = 0; 3006 pub const ndb_ingest_filter_action_NDB_INGEST_ACCEPT: ndb_ingest_filter_action = 1; 3007 pub const ndb_ingest_filter_action_NDB_INGEST_SKIP_VALIDATION: ndb_ingest_filter_action = 2; 3008 pub type ndb_ingest_filter_action = ::std::os::raw::c_uint; 3009 #[repr(C)] 3010 #[derive(Debug, Copy, Clone)] 3011 pub struct ndb_search_key { 3012 pub search: [::std::os::raw::c_char; 24usize], 3013 pub id: [::std::os::raw::c_uchar; 32usize], 3014 pub timestamp: u64, 3015 } 3016 #[test] 3017 fn bindgen_test_layout_ndb_search_key() { 3018 const UNINIT: ::std::mem::MaybeUninit<ndb_search_key> = ::std::mem::MaybeUninit::uninit(); 3019 let ptr = UNINIT.as_ptr(); 3020 assert_eq!( 3021 ::std::mem::size_of::<ndb_search_key>(), 3022 64usize, 3023 concat!("Size of: ", stringify!(ndb_search_key)) 3024 ); 3025 assert_eq!( 3026 ::std::mem::align_of::<ndb_search_key>(), 3027 8usize, 3028 concat!("Alignment of ", stringify!(ndb_search_key)) 3029 ); 3030 assert_eq!( 3031 unsafe { ::std::ptr::addr_of!((*ptr).search) as usize - ptr as usize }, 3032 0usize, 3033 concat!( 3034 "Offset of field: ", 3035 stringify!(ndb_search_key), 3036 "::", 3037 stringify!(search) 3038 ) 3039 ); 3040 assert_eq!( 3041 unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 3042 24usize, 3043 concat!( 3044 "Offset of field: ", 3045 stringify!(ndb_search_key), 3046 "::", 3047 stringify!(id) 3048 ) 3049 ); 3050 assert_eq!( 3051 unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, 3052 56usize, 3053 concat!( 3054 "Offset of field: ", 3055 stringify!(ndb_search_key), 3056 "::", 3057 stringify!(timestamp) 3058 ) 3059 ); 3060 } 3061 #[repr(C)] 3062 #[derive(Debug, Copy, Clone)] 3063 pub struct ndb_search { 3064 pub key: *mut ndb_search_key, 3065 pub profile_key: u64, 3066 pub cursor: *mut ::std::os::raw::c_void, 3067 } 3068 #[test] 3069 fn bindgen_test_layout_ndb_search() { 3070 const UNINIT: ::std::mem::MaybeUninit<ndb_search> = ::std::mem::MaybeUninit::uninit(); 3071 let ptr = UNINIT.as_ptr(); 3072 assert_eq!( 3073 ::std::mem::size_of::<ndb_search>(), 3074 24usize, 3075 concat!("Size of: ", stringify!(ndb_search)) 3076 ); 3077 assert_eq!( 3078 ::std::mem::align_of::<ndb_search>(), 3079 8usize, 3080 concat!("Alignment of ", stringify!(ndb_search)) 3081 ); 3082 assert_eq!( 3083 unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, 3084 0usize, 3085 concat!( 3086 "Offset of field: ", 3087 stringify!(ndb_search), 3088 "::", 3089 stringify!(key) 3090 ) 3091 ); 3092 assert_eq!( 3093 unsafe { ::std::ptr::addr_of!((*ptr).profile_key) as usize - ptr as usize }, 3094 8usize, 3095 concat!( 3096 "Offset of field: ", 3097 stringify!(ndb_search), 3098 "::", 3099 stringify!(profile_key) 3100 ) 3101 ); 3102 assert_eq!( 3103 unsafe { ::std::ptr::addr_of!((*ptr).cursor) as usize - ptr as usize }, 3104 16usize, 3105 concat!( 3106 "Offset of field: ", 3107 stringify!(ndb_search), 3108 "::", 3109 stringify!(cursor) 3110 ) 3111 ); 3112 } 3113 #[repr(C)] 3114 #[derive(Copy, Clone)] 3115 pub struct ndb_fce { 3116 pub evtype: fce_type, 3117 pub __bindgen_anon_1: ndb_fce__bindgen_ty_1, 3118 } 3119 #[repr(C)] 3120 #[derive(Copy, Clone)] 3121 pub union ndb_fce__bindgen_ty_1 { 3122 pub event: ndb_event, 3123 } 3124 #[test] 3125 fn bindgen_test_layout_ndb_fce__bindgen_ty_1() { 3126 const UNINIT: ::std::mem::MaybeUninit<ndb_fce__bindgen_ty_1> = 3127 ::std::mem::MaybeUninit::uninit(); 3128 let ptr = UNINIT.as_ptr(); 3129 assert_eq!( 3130 ::std::mem::size_of::<ndb_fce__bindgen_ty_1>(), 3131 8usize, 3132 concat!("Size of: ", stringify!(ndb_fce__bindgen_ty_1)) 3133 ); 3134 assert_eq!( 3135 ::std::mem::align_of::<ndb_fce__bindgen_ty_1>(), 3136 8usize, 3137 concat!("Alignment of ", stringify!(ndb_fce__bindgen_ty_1)) 3138 ); 3139 assert_eq!( 3140 unsafe { ::std::ptr::addr_of!((*ptr).event) as usize - ptr as usize }, 3141 0usize, 3142 concat!( 3143 "Offset of field: ", 3144 stringify!(ndb_fce__bindgen_ty_1), 3145 "::", 3146 stringify!(event) 3147 ) 3148 ); 3149 } 3150 #[test] 3151 fn bindgen_test_layout_ndb_fce() { 3152 const UNINIT: ::std::mem::MaybeUninit<ndb_fce> = ::std::mem::MaybeUninit::uninit(); 3153 let ptr = UNINIT.as_ptr(); 3154 assert_eq!( 3155 ::std::mem::size_of::<ndb_fce>(), 3156 16usize, 3157 concat!("Size of: ", stringify!(ndb_fce)) 3158 ); 3159 assert_eq!( 3160 ::std::mem::align_of::<ndb_fce>(), 3161 8usize, 3162 concat!("Alignment of ", stringify!(ndb_fce)) 3163 ); 3164 assert_eq!( 3165 unsafe { ::std::ptr::addr_of!((*ptr).evtype) as usize - ptr as usize }, 3166 0usize, 3167 concat!( 3168 "Offset of field: ", 3169 stringify!(ndb_fce), 3170 "::", 3171 stringify!(evtype) 3172 ) 3173 ); 3174 } 3175 #[repr(C)] 3176 #[derive(Copy, Clone)] 3177 pub struct ndb_tce { 3178 pub evtype: tce_type, 3179 pub subid: *const ::std::os::raw::c_char, 3180 pub subid_len: ::std::os::raw::c_int, 3181 pub __bindgen_anon_1: ndb_tce__bindgen_ty_1, 3182 } 3183 #[repr(C)] 3184 #[derive(Copy, Clone)] 3185 pub union ndb_tce__bindgen_ty_1 { 3186 pub event: ndb_event, 3187 pub command_result: ndb_command_result, 3188 } 3189 #[test] 3190 fn bindgen_test_layout_ndb_tce__bindgen_ty_1() { 3191 const UNINIT: ::std::mem::MaybeUninit<ndb_tce__bindgen_ty_1> = 3192 ::std::mem::MaybeUninit::uninit(); 3193 let ptr = UNINIT.as_ptr(); 3194 assert_eq!( 3195 ::std::mem::size_of::<ndb_tce__bindgen_ty_1>(), 3196 24usize, 3197 concat!("Size of: ", stringify!(ndb_tce__bindgen_ty_1)) 3198 ); 3199 assert_eq!( 3200 ::std::mem::align_of::<ndb_tce__bindgen_ty_1>(), 3201 8usize, 3202 concat!("Alignment of ", stringify!(ndb_tce__bindgen_ty_1)) 3203 ); 3204 assert_eq!( 3205 unsafe { ::std::ptr::addr_of!((*ptr).event) as usize - ptr as usize }, 3206 0usize, 3207 concat!( 3208 "Offset of field: ", 3209 stringify!(ndb_tce__bindgen_ty_1), 3210 "::", 3211 stringify!(event) 3212 ) 3213 ); 3214 assert_eq!( 3215 unsafe { ::std::ptr::addr_of!((*ptr).command_result) as usize - ptr as usize }, 3216 0usize, 3217 concat!( 3218 "Offset of field: ", 3219 stringify!(ndb_tce__bindgen_ty_1), 3220 "::", 3221 stringify!(command_result) 3222 ) 3223 ); 3224 } 3225 #[test] 3226 fn bindgen_test_layout_ndb_tce() { 3227 const UNINIT: ::std::mem::MaybeUninit<ndb_tce> = ::std::mem::MaybeUninit::uninit(); 3228 let ptr = UNINIT.as_ptr(); 3229 assert_eq!( 3230 ::std::mem::size_of::<ndb_tce>(), 3231 48usize, 3232 concat!("Size of: ", stringify!(ndb_tce)) 3233 ); 3234 assert_eq!( 3235 ::std::mem::align_of::<ndb_tce>(), 3236 8usize, 3237 concat!("Alignment of ", stringify!(ndb_tce)) 3238 ); 3239 assert_eq!( 3240 unsafe { ::std::ptr::addr_of!((*ptr).evtype) as usize - ptr as usize }, 3241 0usize, 3242 concat!( 3243 "Offset of field: ", 3244 stringify!(ndb_tce), 3245 "::", 3246 stringify!(evtype) 3247 ) 3248 ); 3249 assert_eq!( 3250 unsafe { ::std::ptr::addr_of!((*ptr).subid) as usize - ptr as usize }, 3251 8usize, 3252 concat!( 3253 "Offset of field: ", 3254 stringify!(ndb_tce), 3255 "::", 3256 stringify!(subid) 3257 ) 3258 ); 3259 assert_eq!( 3260 unsafe { ::std::ptr::addr_of!((*ptr).subid_len) as usize - ptr as usize }, 3261 16usize, 3262 concat!( 3263 "Offset of field: ", 3264 stringify!(ndb_tce), 3265 "::", 3266 stringify!(subid_len) 3267 ) 3268 ); 3269 } 3270 pub type ndb_ingest_filter_fn = ::std::option::Option< 3271 unsafe extern "C" fn( 3272 arg1: *mut ::std::os::raw::c_void, 3273 arg2: *mut ndb_note, 3274 ) -> ndb_ingest_filter_action, 3275 >; 3276 pub const ndb_filter_fieldtype_NDB_FILTER_IDS: ndb_filter_fieldtype = 1; 3277 pub const ndb_filter_fieldtype_NDB_FILTER_AUTHORS: ndb_filter_fieldtype = 2; 3278 pub const ndb_filter_fieldtype_NDB_FILTER_KINDS: ndb_filter_fieldtype = 3; 3279 pub const ndb_filter_fieldtype_NDB_FILTER_TAGS: ndb_filter_fieldtype = 4; 3280 pub const ndb_filter_fieldtype_NDB_FILTER_SINCE: ndb_filter_fieldtype = 5; 3281 pub const ndb_filter_fieldtype_NDB_FILTER_UNTIL: ndb_filter_fieldtype = 6; 3282 pub const ndb_filter_fieldtype_NDB_FILTER_LIMIT: ndb_filter_fieldtype = 7; 3283 pub const ndb_filter_fieldtype_NDB_FILTER_SEARCH: ndb_filter_fieldtype = 8; 3284 pub const ndb_filter_fieldtype_NDB_FILTER_RELAYS: ndb_filter_fieldtype = 9; 3285 pub const ndb_filter_fieldtype_NDB_FILTER_CUSTOM: ndb_filter_fieldtype = 10; 3286 pub type ndb_filter_fieldtype = ::std::os::raw::c_uint; 3287 pub const ndb_generic_element_type_NDB_ELEMENT_UNKNOWN: ndb_generic_element_type = 0; 3288 pub const ndb_generic_element_type_NDB_ELEMENT_STRING: ndb_generic_element_type = 1; 3289 pub const ndb_generic_element_type_NDB_ELEMENT_ID: ndb_generic_element_type = 2; 3290 pub const ndb_generic_element_type_NDB_ELEMENT_INT: ndb_generic_element_type = 3; 3291 pub const ndb_generic_element_type_NDB_ELEMENT_CUSTOM: ndb_generic_element_type = 4; 3292 pub type ndb_generic_element_type = ::std::os::raw::c_uint; 3293 pub const ndb_search_order_NDB_ORDER_DESCENDING: ndb_search_order = 0; 3294 pub const ndb_search_order_NDB_ORDER_ASCENDING: ndb_search_order = 1; 3295 pub type ndb_search_order = ::std::os::raw::c_uint; 3296 pub const ndb_dbs_NDB_DB_NOTE: ndb_dbs = 0; 3297 pub const ndb_dbs_NDB_DB_META: ndb_dbs = 1; 3298 pub const ndb_dbs_NDB_DB_PROFILE: ndb_dbs = 2; 3299 pub const ndb_dbs_NDB_DB_NOTE_ID: ndb_dbs = 3; 3300 pub const ndb_dbs_NDB_DB_PROFILE_PK: ndb_dbs = 4; 3301 pub const ndb_dbs_NDB_DB_NDB_META: ndb_dbs = 5; 3302 pub const ndb_dbs_NDB_DB_PROFILE_SEARCH: ndb_dbs = 6; 3303 pub const ndb_dbs_NDB_DB_PROFILE_LAST_FETCH: ndb_dbs = 7; 3304 pub const ndb_dbs_NDB_DB_NOTE_KIND: ndb_dbs = 8; 3305 pub const ndb_dbs_NDB_DB_NOTE_TEXT: ndb_dbs = 9; 3306 pub const ndb_dbs_NDB_DB_NOTE_BLOCKS: ndb_dbs = 10; 3307 pub const ndb_dbs_NDB_DB_NOTE_TAGS: ndb_dbs = 11; 3308 pub const ndb_dbs_NDB_DB_NOTE_PUBKEY: ndb_dbs = 12; 3309 pub const ndb_dbs_NDB_DB_NOTE_PUBKEY_KIND: ndb_dbs = 13; 3310 pub const ndb_dbs_NDB_DB_NOTE_RELAY_KIND: ndb_dbs = 14; 3311 pub const ndb_dbs_NDB_DB_NOTE_RELAYS: ndb_dbs = 15; 3312 pub const ndb_dbs_NDB_DBS: ndb_dbs = 16; 3313 pub type ndb_dbs = ::std::os::raw::c_uint; 3314 pub const ndb_common_kind_NDB_CKIND_PROFILE: ndb_common_kind = 0; 3315 pub const ndb_common_kind_NDB_CKIND_TEXT: ndb_common_kind = 1; 3316 pub const ndb_common_kind_NDB_CKIND_CONTACTS: ndb_common_kind = 2; 3317 pub const ndb_common_kind_NDB_CKIND_DM: ndb_common_kind = 3; 3318 pub const ndb_common_kind_NDB_CKIND_DELETE: ndb_common_kind = 4; 3319 pub const ndb_common_kind_NDB_CKIND_REPOST: ndb_common_kind = 5; 3320 pub const ndb_common_kind_NDB_CKIND_REACTION: ndb_common_kind = 6; 3321 pub const ndb_common_kind_NDB_CKIND_ZAP: ndb_common_kind = 7; 3322 pub const ndb_common_kind_NDB_CKIND_ZAP_REQUEST: ndb_common_kind = 8; 3323 pub const ndb_common_kind_NDB_CKIND_NWC_REQUEST: ndb_common_kind = 9; 3324 pub const ndb_common_kind_NDB_CKIND_NWC_RESPONSE: ndb_common_kind = 10; 3325 pub const ndb_common_kind_NDB_CKIND_HTTP_AUTH: ndb_common_kind = 11; 3326 pub const ndb_common_kind_NDB_CKIND_LIST: ndb_common_kind = 12; 3327 pub const ndb_common_kind_NDB_CKIND_LONGFORM: ndb_common_kind = 13; 3328 pub const ndb_common_kind_NDB_CKIND_STATUS: ndb_common_kind = 14; 3329 pub const ndb_common_kind_NDB_CKIND_COUNT: ndb_common_kind = 15; 3330 pub type ndb_common_kind = ::std::os::raw::c_uint; 3331 #[repr(C)] 3332 #[derive(Debug, Copy, Clone)] 3333 pub struct ndb_builder { 3334 pub mem: cursor, 3335 pub note_cur: cursor, 3336 pub strings: cursor, 3337 pub str_indices: cursor, 3338 pub note: *mut ndb_note, 3339 pub current_tag: *mut ndb_tag, 3340 } 3341 #[test] 3342 fn bindgen_test_layout_ndb_builder() { 3343 const UNINIT: ::std::mem::MaybeUninit<ndb_builder> = ::std::mem::MaybeUninit::uninit(); 3344 let ptr = UNINIT.as_ptr(); 3345 assert_eq!( 3346 ::std::mem::size_of::<ndb_builder>(), 3347 112usize, 3348 concat!("Size of: ", stringify!(ndb_builder)) 3349 ); 3350 assert_eq!( 3351 ::std::mem::align_of::<ndb_builder>(), 3352 8usize, 3353 concat!("Alignment of ", stringify!(ndb_builder)) 3354 ); 3355 assert_eq!( 3356 unsafe { ::std::ptr::addr_of!((*ptr).mem) as usize - ptr as usize }, 3357 0usize, 3358 concat!( 3359 "Offset of field: ", 3360 stringify!(ndb_builder), 3361 "::", 3362 stringify!(mem) 3363 ) 3364 ); 3365 assert_eq!( 3366 unsafe { ::std::ptr::addr_of!((*ptr).note_cur) as usize - ptr as usize }, 3367 24usize, 3368 concat!( 3369 "Offset of field: ", 3370 stringify!(ndb_builder), 3371 "::", 3372 stringify!(note_cur) 3373 ) 3374 ); 3375 assert_eq!( 3376 unsafe { ::std::ptr::addr_of!((*ptr).strings) as usize - ptr as usize }, 3377 48usize, 3378 concat!( 3379 "Offset of field: ", 3380 stringify!(ndb_builder), 3381 "::", 3382 stringify!(strings) 3383 ) 3384 ); 3385 assert_eq!( 3386 unsafe { ::std::ptr::addr_of!((*ptr).str_indices) as usize - ptr as usize }, 3387 72usize, 3388 concat!( 3389 "Offset of field: ", 3390 stringify!(ndb_builder), 3391 "::", 3392 stringify!(str_indices) 3393 ) 3394 ); 3395 assert_eq!( 3396 unsafe { ::std::ptr::addr_of!((*ptr).note) as usize - ptr as usize }, 3397 96usize, 3398 concat!( 3399 "Offset of field: ", 3400 stringify!(ndb_builder), 3401 "::", 3402 stringify!(note) 3403 ) 3404 ); 3405 assert_eq!( 3406 unsafe { ::std::ptr::addr_of!((*ptr).current_tag) as usize - ptr as usize }, 3407 104usize, 3408 concat!( 3409 "Offset of field: ", 3410 stringify!(ndb_builder), 3411 "::", 3412 stringify!(current_tag) 3413 ) 3414 ); 3415 } 3416 #[repr(C)] 3417 #[derive(Debug, Copy, Clone)] 3418 pub struct ndb_note_relay_iterator { 3419 pub txn: *mut ndb_txn, 3420 pub note_key: u64, 3421 pub cursor_op: ::std::os::raw::c_int, 3422 pub mdb_cur: *mut ::std::os::raw::c_void, 3423 } 3424 #[test] 3425 fn bindgen_test_layout_ndb_note_relay_iterator() { 3426 const UNINIT: ::std::mem::MaybeUninit<ndb_note_relay_iterator> = 3427 ::std::mem::MaybeUninit::uninit(); 3428 let ptr = UNINIT.as_ptr(); 3429 assert_eq!( 3430 ::std::mem::size_of::<ndb_note_relay_iterator>(), 3431 32usize, 3432 concat!("Size of: ", stringify!(ndb_note_relay_iterator)) 3433 ); 3434 assert_eq!( 3435 ::std::mem::align_of::<ndb_note_relay_iterator>(), 3436 8usize, 3437 concat!("Alignment of ", stringify!(ndb_note_relay_iterator)) 3438 ); 3439 assert_eq!( 3440 unsafe { ::std::ptr::addr_of!((*ptr).txn) as usize - ptr as usize }, 3441 0usize, 3442 concat!( 3443 "Offset of field: ", 3444 stringify!(ndb_note_relay_iterator), 3445 "::", 3446 stringify!(txn) 3447 ) 3448 ); 3449 assert_eq!( 3450 unsafe { ::std::ptr::addr_of!((*ptr).note_key) as usize - ptr as usize }, 3451 8usize, 3452 concat!( 3453 "Offset of field: ", 3454 stringify!(ndb_note_relay_iterator), 3455 "::", 3456 stringify!(note_key) 3457 ) 3458 ); 3459 assert_eq!( 3460 unsafe { ::std::ptr::addr_of!((*ptr).cursor_op) as usize - ptr as usize }, 3461 16usize, 3462 concat!( 3463 "Offset of field: ", 3464 stringify!(ndb_note_relay_iterator), 3465 "::", 3466 stringify!(cursor_op) 3467 ) 3468 ); 3469 assert_eq!( 3470 unsafe { ::std::ptr::addr_of!((*ptr).mdb_cur) as usize - ptr as usize }, 3471 24usize, 3472 concat!( 3473 "Offset of field: ", 3474 stringify!(ndb_note_relay_iterator), 3475 "::", 3476 stringify!(mdb_cur) 3477 ) 3478 ); 3479 } 3480 #[repr(C)] 3481 #[derive(Debug, Copy, Clone)] 3482 pub struct ndb_note_meta_iterator { 3483 pub header: *mut ndb_note_meta, 3484 pub cur: *mut ndb_note_meta, 3485 pub index: ::std::os::raw::c_int, 3486 } 3487 #[test] 3488 fn bindgen_test_layout_ndb_note_meta_iterator() { 3489 const UNINIT: ::std::mem::MaybeUninit<ndb_note_meta_iterator> = 3490 ::std::mem::MaybeUninit::uninit(); 3491 let ptr = UNINIT.as_ptr(); 3492 assert_eq!( 3493 ::std::mem::size_of::<ndb_note_meta_iterator>(), 3494 24usize, 3495 concat!("Size of: ", stringify!(ndb_note_meta_iterator)) 3496 ); 3497 assert_eq!( 3498 ::std::mem::align_of::<ndb_note_meta_iterator>(), 3499 8usize, 3500 concat!("Alignment of ", stringify!(ndb_note_meta_iterator)) 3501 ); 3502 assert_eq!( 3503 unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize }, 3504 0usize, 3505 concat!( 3506 "Offset of field: ", 3507 stringify!(ndb_note_meta_iterator), 3508 "::", 3509 stringify!(header) 3510 ) 3511 ); 3512 assert_eq!( 3513 unsafe { ::std::ptr::addr_of!((*ptr).cur) as usize - ptr as usize }, 3514 8usize, 3515 concat!( 3516 "Offset of field: ", 3517 stringify!(ndb_note_meta_iterator), 3518 "::", 3519 stringify!(cur) 3520 ) 3521 ); 3522 assert_eq!( 3523 unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 3524 16usize, 3525 concat!( 3526 "Offset of field: ", 3527 stringify!(ndb_note_meta_iterator), 3528 "::", 3529 stringify!(index) 3530 ) 3531 ); 3532 } 3533 #[repr(C)] 3534 #[derive(Debug, Copy, Clone)] 3535 pub struct ndb_iterator { 3536 pub note: *mut ndb_note, 3537 pub tag: *mut ndb_tag, 3538 pub index: ::std::os::raw::c_int, 3539 } 3540 #[test] 3541 fn bindgen_test_layout_ndb_iterator() { 3542 const UNINIT: ::std::mem::MaybeUninit<ndb_iterator> = ::std::mem::MaybeUninit::uninit(); 3543 let ptr = UNINIT.as_ptr(); 3544 assert_eq!( 3545 ::std::mem::size_of::<ndb_iterator>(), 3546 24usize, 3547 concat!("Size of: ", stringify!(ndb_iterator)) 3548 ); 3549 assert_eq!( 3550 ::std::mem::align_of::<ndb_iterator>(), 3551 8usize, 3552 concat!("Alignment of ", stringify!(ndb_iterator)) 3553 ); 3554 assert_eq!( 3555 unsafe { ::std::ptr::addr_of!((*ptr).note) as usize - ptr as usize }, 3556 0usize, 3557 concat!( 3558 "Offset of field: ", 3559 stringify!(ndb_iterator), 3560 "::", 3561 stringify!(note) 3562 ) 3563 ); 3564 assert_eq!( 3565 unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 3566 8usize, 3567 concat!( 3568 "Offset of field: ", 3569 stringify!(ndb_iterator), 3570 "::", 3571 stringify!(tag) 3572 ) 3573 ); 3574 assert_eq!( 3575 unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 3576 16usize, 3577 concat!( 3578 "Offset of field: ", 3579 stringify!(ndb_iterator), 3580 "::", 3581 stringify!(index) 3582 ) 3583 ); 3584 } 3585 #[repr(C)] 3586 #[derive(Debug, Copy, Clone)] 3587 pub struct ndb_filter_string { 3588 pub string: *const ::std::os::raw::c_char, 3589 pub len: ::std::os::raw::c_int, 3590 } 3591 #[test] 3592 fn bindgen_test_layout_ndb_filter_string() { 3593 const UNINIT: ::std::mem::MaybeUninit<ndb_filter_string> = ::std::mem::MaybeUninit::uninit(); 3594 let ptr = UNINIT.as_ptr(); 3595 assert_eq!( 3596 ::std::mem::size_of::<ndb_filter_string>(), 3597 16usize, 3598 concat!("Size of: ", stringify!(ndb_filter_string)) 3599 ); 3600 assert_eq!( 3601 ::std::mem::align_of::<ndb_filter_string>(), 3602 8usize, 3603 concat!("Alignment of ", stringify!(ndb_filter_string)) 3604 ); 3605 assert_eq!( 3606 unsafe { ::std::ptr::addr_of!((*ptr).string) as usize - ptr as usize }, 3607 0usize, 3608 concat!( 3609 "Offset of field: ", 3610 stringify!(ndb_filter_string), 3611 "::", 3612 stringify!(string) 3613 ) 3614 ); 3615 assert_eq!( 3616 unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, 3617 8usize, 3618 concat!( 3619 "Offset of field: ", 3620 stringify!(ndb_filter_string), 3621 "::", 3622 stringify!(len) 3623 ) 3624 ); 3625 } 3626 pub type ndb_filter_callback_fn = ::std::option::Option< 3627 unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: *mut ndb_note) -> bool, 3628 >; 3629 #[repr(C)] 3630 #[derive(Debug, Copy, Clone)] 3631 pub struct ndb_filter_custom { 3632 pub ctx: *mut ::std::os::raw::c_void, 3633 pub cb: ndb_filter_callback_fn, 3634 } 3635 #[test] 3636 fn bindgen_test_layout_ndb_filter_custom() { 3637 const UNINIT: ::std::mem::MaybeUninit<ndb_filter_custom> = ::std::mem::MaybeUninit::uninit(); 3638 let ptr = UNINIT.as_ptr(); 3639 assert_eq!( 3640 ::std::mem::size_of::<ndb_filter_custom>(), 3641 16usize, 3642 concat!("Size of: ", stringify!(ndb_filter_custom)) 3643 ); 3644 assert_eq!( 3645 ::std::mem::align_of::<ndb_filter_custom>(), 3646 8usize, 3647 concat!("Alignment of ", stringify!(ndb_filter_custom)) 3648 ); 3649 assert_eq!( 3650 unsafe { ::std::ptr::addr_of!((*ptr).ctx) as usize - ptr as usize }, 3651 0usize, 3652 concat!( 3653 "Offset of field: ", 3654 stringify!(ndb_filter_custom), 3655 "::", 3656 stringify!(ctx) 3657 ) 3658 ); 3659 assert_eq!( 3660 unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, 3661 8usize, 3662 concat!( 3663 "Offset of field: ", 3664 stringify!(ndb_filter_custom), 3665 "::", 3666 stringify!(cb) 3667 ) 3668 ); 3669 } 3670 #[repr(C)] 3671 #[derive(Copy, Clone)] 3672 pub union ndb_filter_element { 3673 pub string: ndb_filter_string, 3674 pub id: *const ::std::os::raw::c_uchar, 3675 pub integer: u64, 3676 pub custom_filter: ndb_filter_custom, 3677 } 3678 #[test] 3679 fn bindgen_test_layout_ndb_filter_element() { 3680 const UNINIT: ::std::mem::MaybeUninit<ndb_filter_element> = ::std::mem::MaybeUninit::uninit(); 3681 let ptr = UNINIT.as_ptr(); 3682 assert_eq!( 3683 ::std::mem::size_of::<ndb_filter_element>(), 3684 16usize, 3685 concat!("Size of: ", stringify!(ndb_filter_element)) 3686 ); 3687 assert_eq!( 3688 ::std::mem::align_of::<ndb_filter_element>(), 3689 8usize, 3690 concat!("Alignment of ", stringify!(ndb_filter_element)) 3691 ); 3692 assert_eq!( 3693 unsafe { ::std::ptr::addr_of!((*ptr).string) as usize - ptr as usize }, 3694 0usize, 3695 concat!( 3696 "Offset of field: ", 3697 stringify!(ndb_filter_element), 3698 "::", 3699 stringify!(string) 3700 ) 3701 ); 3702 assert_eq!( 3703 unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 3704 0usize, 3705 concat!( 3706 "Offset of field: ", 3707 stringify!(ndb_filter_element), 3708 "::", 3709 stringify!(id) 3710 ) 3711 ); 3712 assert_eq!( 3713 unsafe { ::std::ptr::addr_of!((*ptr).integer) as usize - ptr as usize }, 3714 0usize, 3715 concat!( 3716 "Offset of field: ", 3717 stringify!(ndb_filter_element), 3718 "::", 3719 stringify!(integer) 3720 ) 3721 ); 3722 assert_eq!( 3723 unsafe { ::std::ptr::addr_of!((*ptr).custom_filter) as usize - ptr as usize }, 3724 0usize, 3725 concat!( 3726 "Offset of field: ", 3727 stringify!(ndb_filter_element), 3728 "::", 3729 stringify!(custom_filter) 3730 ) 3731 ); 3732 } 3733 #[repr(C)] 3734 #[derive(Debug, Copy, Clone)] 3735 pub struct ndb_filter_field { 3736 pub type_: ndb_filter_fieldtype, 3737 pub elem_type: ndb_generic_element_type, 3738 pub tag: ::std::os::raw::c_char, 3739 } 3740 #[test] 3741 fn bindgen_test_layout_ndb_filter_field() { 3742 const UNINIT: ::std::mem::MaybeUninit<ndb_filter_field> = ::std::mem::MaybeUninit::uninit(); 3743 let ptr = UNINIT.as_ptr(); 3744 assert_eq!( 3745 ::std::mem::size_of::<ndb_filter_field>(), 3746 12usize, 3747 concat!("Size of: ", stringify!(ndb_filter_field)) 3748 ); 3749 assert_eq!( 3750 ::std::mem::align_of::<ndb_filter_field>(), 3751 4usize, 3752 concat!("Alignment of ", stringify!(ndb_filter_field)) 3753 ); 3754 assert_eq!( 3755 unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 3756 0usize, 3757 concat!( 3758 "Offset of field: ", 3759 stringify!(ndb_filter_field), 3760 "::", 3761 stringify!(type_) 3762 ) 3763 ); 3764 assert_eq!( 3765 unsafe { ::std::ptr::addr_of!((*ptr).elem_type) as usize - ptr as usize }, 3766 4usize, 3767 concat!( 3768 "Offset of field: ", 3769 stringify!(ndb_filter_field), 3770 "::", 3771 stringify!(elem_type) 3772 ) 3773 ); 3774 assert_eq!( 3775 unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 3776 8usize, 3777 concat!( 3778 "Offset of field: ", 3779 stringify!(ndb_filter_field), 3780 "::", 3781 stringify!(tag) 3782 ) 3783 ); 3784 } 3785 #[repr(C)] 3786 #[derive(Debug)] 3787 pub struct ndb_filter_elements { 3788 pub field: ndb_filter_field, 3789 pub count: ::std::os::raw::c_int, 3790 pub elements: __IncompleteArrayField<u64>, 3791 } 3792 #[test] 3793 fn bindgen_test_layout_ndb_filter_elements() { 3794 const UNINIT: ::std::mem::MaybeUninit<ndb_filter_elements> = ::std::mem::MaybeUninit::uninit(); 3795 let ptr = UNINIT.as_ptr(); 3796 assert_eq!( 3797 ::std::mem::size_of::<ndb_filter_elements>(), 3798 16usize, 3799 concat!("Size of: ", stringify!(ndb_filter_elements)) 3800 ); 3801 assert_eq!( 3802 ::std::mem::align_of::<ndb_filter_elements>(), 3803 8usize, 3804 concat!("Alignment of ", stringify!(ndb_filter_elements)) 3805 ); 3806 assert_eq!( 3807 unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 3808 0usize, 3809 concat!( 3810 "Offset of field: ", 3811 stringify!(ndb_filter_elements), 3812 "::", 3813 stringify!(field) 3814 ) 3815 ); 3816 assert_eq!( 3817 unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 3818 12usize, 3819 concat!( 3820 "Offset of field: ", 3821 stringify!(ndb_filter_elements), 3822 "::", 3823 stringify!(count) 3824 ) 3825 ); 3826 assert_eq!( 3827 unsafe { ::std::ptr::addr_of!((*ptr).elements) as usize - ptr as usize }, 3828 16usize, 3829 concat!( 3830 "Offset of field: ", 3831 stringify!(ndb_filter_elements), 3832 "::", 3833 stringify!(elements) 3834 ) 3835 ); 3836 } 3837 #[repr(C)] 3838 #[derive(Debug, Copy, Clone)] 3839 pub struct ndb_filter { 3840 pub elem_buf: cursor, 3841 pub data_buf: cursor, 3842 pub num_elements: ::std::os::raw::c_int, 3843 pub finalized: ::std::os::raw::c_int, 3844 pub current: ::std::os::raw::c_int, 3845 pub elements: [::std::os::raw::c_int; 10usize], 3846 } 3847 #[test] 3848 fn bindgen_test_layout_ndb_filter() { 3849 const UNINIT: ::std::mem::MaybeUninit<ndb_filter> = ::std::mem::MaybeUninit::uninit(); 3850 let ptr = UNINIT.as_ptr(); 3851 assert_eq!( 3852 ::std::mem::size_of::<ndb_filter>(), 3853 104usize, 3854 concat!("Size of: ", stringify!(ndb_filter)) 3855 ); 3856 assert_eq!( 3857 ::std::mem::align_of::<ndb_filter>(), 3858 8usize, 3859 concat!("Alignment of ", stringify!(ndb_filter)) 3860 ); 3861 assert_eq!( 3862 unsafe { ::std::ptr::addr_of!((*ptr).elem_buf) as usize - ptr as usize }, 3863 0usize, 3864 concat!( 3865 "Offset of field: ", 3866 stringify!(ndb_filter), 3867 "::", 3868 stringify!(elem_buf) 3869 ) 3870 ); 3871 assert_eq!( 3872 unsafe { ::std::ptr::addr_of!((*ptr).data_buf) as usize - ptr as usize }, 3873 24usize, 3874 concat!( 3875 "Offset of field: ", 3876 stringify!(ndb_filter), 3877 "::", 3878 stringify!(data_buf) 3879 ) 3880 ); 3881 assert_eq!( 3882 unsafe { ::std::ptr::addr_of!((*ptr).num_elements) as usize - ptr as usize }, 3883 48usize, 3884 concat!( 3885 "Offset of field: ", 3886 stringify!(ndb_filter), 3887 "::", 3888 stringify!(num_elements) 3889 ) 3890 ); 3891 assert_eq!( 3892 unsafe { ::std::ptr::addr_of!((*ptr).finalized) as usize - ptr as usize }, 3893 52usize, 3894 concat!( 3895 "Offset of field: ", 3896 stringify!(ndb_filter), 3897 "::", 3898 stringify!(finalized) 3899 ) 3900 ); 3901 assert_eq!( 3902 unsafe { ::std::ptr::addr_of!((*ptr).current) as usize - ptr as usize }, 3903 56usize, 3904 concat!( 3905 "Offset of field: ", 3906 stringify!(ndb_filter), 3907 "::", 3908 stringify!(current) 3909 ) 3910 ); 3911 assert_eq!( 3912 unsafe { ::std::ptr::addr_of!((*ptr).elements) as usize - ptr as usize }, 3913 60usize, 3914 concat!( 3915 "Offset of field: ", 3916 stringify!(ndb_filter), 3917 "::", 3918 stringify!(elements) 3919 ) 3920 ); 3921 } 3922 #[repr(C)] 3923 #[derive(Debug, Copy, Clone)] 3924 pub struct ndb_config { 3925 pub flags: ::std::os::raw::c_int, 3926 pub ingester_threads: ::std::os::raw::c_int, 3927 pub writer_scratch_buffer_size: ::std::os::raw::c_int, 3928 pub mapsize: usize, 3929 pub filter_context: *mut ::std::os::raw::c_void, 3930 pub ingest_filter: ndb_ingest_filter_fn, 3931 pub sub_cb_ctx: *mut ::std::os::raw::c_void, 3932 pub sub_cb: ndb_sub_fn, 3933 } 3934 #[test] 3935 fn bindgen_test_layout_ndb_config() { 3936 const UNINIT: ::std::mem::MaybeUninit<ndb_config> = ::std::mem::MaybeUninit::uninit(); 3937 let ptr = UNINIT.as_ptr(); 3938 assert_eq!( 3939 ::std::mem::size_of::<ndb_config>(), 3940 56usize, 3941 concat!("Size of: ", stringify!(ndb_config)) 3942 ); 3943 assert_eq!( 3944 ::std::mem::align_of::<ndb_config>(), 3945 8usize, 3946 concat!("Alignment of ", stringify!(ndb_config)) 3947 ); 3948 assert_eq!( 3949 unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 3950 0usize, 3951 concat!( 3952 "Offset of field: ", 3953 stringify!(ndb_config), 3954 "::", 3955 stringify!(flags) 3956 ) 3957 ); 3958 assert_eq!( 3959 unsafe { ::std::ptr::addr_of!((*ptr).ingester_threads) as usize - ptr as usize }, 3960 4usize, 3961 concat!( 3962 "Offset of field: ", 3963 stringify!(ndb_config), 3964 "::", 3965 stringify!(ingester_threads) 3966 ) 3967 ); 3968 assert_eq!( 3969 unsafe { ::std::ptr::addr_of!((*ptr).writer_scratch_buffer_size) as usize - ptr as usize }, 3970 8usize, 3971 concat!( 3972 "Offset of field: ", 3973 stringify!(ndb_config), 3974 "::", 3975 stringify!(writer_scratch_buffer_size) 3976 ) 3977 ); 3978 assert_eq!( 3979 unsafe { ::std::ptr::addr_of!((*ptr).mapsize) as usize - ptr as usize }, 3980 16usize, 3981 concat!( 3982 "Offset of field: ", 3983 stringify!(ndb_config), 3984 "::", 3985 stringify!(mapsize) 3986 ) 3987 ); 3988 assert_eq!( 3989 unsafe { ::std::ptr::addr_of!((*ptr).filter_context) as usize - ptr as usize }, 3990 24usize, 3991 concat!( 3992 "Offset of field: ", 3993 stringify!(ndb_config), 3994 "::", 3995 stringify!(filter_context) 3996 ) 3997 ); 3998 assert_eq!( 3999 unsafe { ::std::ptr::addr_of!((*ptr).ingest_filter) as usize - ptr as usize }, 4000 32usize, 4001 concat!( 4002 "Offset of field: ", 4003 stringify!(ndb_config), 4004 "::", 4005 stringify!(ingest_filter) 4006 ) 4007 ); 4008 assert_eq!( 4009 unsafe { ::std::ptr::addr_of!((*ptr).sub_cb_ctx) as usize - ptr as usize }, 4010 40usize, 4011 concat!( 4012 "Offset of field: ", 4013 stringify!(ndb_config), 4014 "::", 4015 stringify!(sub_cb_ctx) 4016 ) 4017 ); 4018 assert_eq!( 4019 unsafe { ::std::ptr::addr_of!((*ptr).sub_cb) as usize - ptr as usize }, 4020 48usize, 4021 concat!( 4022 "Offset of field: ", 4023 stringify!(ndb_config), 4024 "::", 4025 stringify!(sub_cb) 4026 ) 4027 ); 4028 } 4029 #[repr(C)] 4030 #[derive(Debug, Copy, Clone)] 4031 pub struct ndb_text_search_config { 4032 pub order: ndb_search_order, 4033 pub limit: ::std::os::raw::c_int, 4034 } 4035 #[test] 4036 fn bindgen_test_layout_ndb_text_search_config() { 4037 const UNINIT: ::std::mem::MaybeUninit<ndb_text_search_config> = 4038 ::std::mem::MaybeUninit::uninit(); 4039 let ptr = UNINIT.as_ptr(); 4040 assert_eq!( 4041 ::std::mem::size_of::<ndb_text_search_config>(), 4042 8usize, 4043 concat!("Size of: ", stringify!(ndb_text_search_config)) 4044 ); 4045 assert_eq!( 4046 ::std::mem::align_of::<ndb_text_search_config>(), 4047 4usize, 4048 concat!("Alignment of ", stringify!(ndb_text_search_config)) 4049 ); 4050 assert_eq!( 4051 unsafe { ::std::ptr::addr_of!((*ptr).order) as usize - ptr as usize }, 4052 0usize, 4053 concat!( 4054 "Offset of field: ", 4055 stringify!(ndb_text_search_config), 4056 "::", 4057 stringify!(order) 4058 ) 4059 ); 4060 assert_eq!( 4061 unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, 4062 4usize, 4063 concat!( 4064 "Offset of field: ", 4065 stringify!(ndb_text_search_config), 4066 "::", 4067 stringify!(limit) 4068 ) 4069 ); 4070 } 4071 #[repr(C)] 4072 #[derive(Debug, Copy, Clone)] 4073 pub struct ndb_stat_counts { 4074 pub key_size: usize, 4075 pub value_size: usize, 4076 pub count: usize, 4077 } 4078 #[test] 4079 fn bindgen_test_layout_ndb_stat_counts() { 4080 const UNINIT: ::std::mem::MaybeUninit<ndb_stat_counts> = ::std::mem::MaybeUninit::uninit(); 4081 let ptr = UNINIT.as_ptr(); 4082 assert_eq!( 4083 ::std::mem::size_of::<ndb_stat_counts>(), 4084 24usize, 4085 concat!("Size of: ", stringify!(ndb_stat_counts)) 4086 ); 4087 assert_eq!( 4088 ::std::mem::align_of::<ndb_stat_counts>(), 4089 8usize, 4090 concat!("Alignment of ", stringify!(ndb_stat_counts)) 4091 ); 4092 assert_eq!( 4093 unsafe { ::std::ptr::addr_of!((*ptr).key_size) as usize - ptr as usize }, 4094 0usize, 4095 concat!( 4096 "Offset of field: ", 4097 stringify!(ndb_stat_counts), 4098 "::", 4099 stringify!(key_size) 4100 ) 4101 ); 4102 assert_eq!( 4103 unsafe { ::std::ptr::addr_of!((*ptr).value_size) as usize - ptr as usize }, 4104 8usize, 4105 concat!( 4106 "Offset of field: ", 4107 stringify!(ndb_stat_counts), 4108 "::", 4109 stringify!(value_size) 4110 ) 4111 ); 4112 assert_eq!( 4113 unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 4114 16usize, 4115 concat!( 4116 "Offset of field: ", 4117 stringify!(ndb_stat_counts), 4118 "::", 4119 stringify!(count) 4120 ) 4121 ); 4122 } 4123 #[repr(C)] 4124 #[derive(Debug, Copy, Clone)] 4125 pub struct ndb_stat { 4126 pub dbs: [ndb_stat_counts; 16usize], 4127 pub common_kinds: [ndb_stat_counts; 15usize], 4128 pub other_kinds: ndb_stat_counts, 4129 } 4130 #[test] 4131 fn bindgen_test_layout_ndb_stat() { 4132 const UNINIT: ::std::mem::MaybeUninit<ndb_stat> = ::std::mem::MaybeUninit::uninit(); 4133 let ptr = UNINIT.as_ptr(); 4134 assert_eq!( 4135 ::std::mem::size_of::<ndb_stat>(), 4136 768usize, 4137 concat!("Size of: ", stringify!(ndb_stat)) 4138 ); 4139 assert_eq!( 4140 ::std::mem::align_of::<ndb_stat>(), 4141 8usize, 4142 concat!("Alignment of ", stringify!(ndb_stat)) 4143 ); 4144 assert_eq!( 4145 unsafe { ::std::ptr::addr_of!((*ptr).dbs) as usize - ptr as usize }, 4146 0usize, 4147 concat!( 4148 "Offset of field: ", 4149 stringify!(ndb_stat), 4150 "::", 4151 stringify!(dbs) 4152 ) 4153 ); 4154 assert_eq!( 4155 unsafe { ::std::ptr::addr_of!((*ptr).common_kinds) as usize - ptr as usize }, 4156 384usize, 4157 concat!( 4158 "Offset of field: ", 4159 stringify!(ndb_stat), 4160 "::", 4161 stringify!(common_kinds) 4162 ) 4163 ); 4164 assert_eq!( 4165 unsafe { ::std::ptr::addr_of!((*ptr).other_kinds) as usize - ptr as usize }, 4166 744usize, 4167 concat!( 4168 "Offset of field: ", 4169 stringify!(ndb_stat), 4170 "::", 4171 stringify!(other_kinds) 4172 ) 4173 ); 4174 } 4175 #[repr(C)] 4176 #[derive(Debug, Copy, Clone)] 4177 pub struct ndb_text_search_key { 4178 pub str_len: ::std::os::raw::c_int, 4179 pub str_: *const ::std::os::raw::c_char, 4180 pub timestamp: u64, 4181 pub note_id: u64, 4182 pub word_index: u64, 4183 } 4184 #[test] 4185 fn bindgen_test_layout_ndb_text_search_key() { 4186 const UNINIT: ::std::mem::MaybeUninit<ndb_text_search_key> = ::std::mem::MaybeUninit::uninit(); 4187 let ptr = UNINIT.as_ptr(); 4188 assert_eq!( 4189 ::std::mem::size_of::<ndb_text_search_key>(), 4190 40usize, 4191 concat!("Size of: ", stringify!(ndb_text_search_key)) 4192 ); 4193 assert_eq!( 4194 ::std::mem::align_of::<ndb_text_search_key>(), 4195 8usize, 4196 concat!("Alignment of ", stringify!(ndb_text_search_key)) 4197 ); 4198 assert_eq!( 4199 unsafe { ::std::ptr::addr_of!((*ptr).str_len) as usize - ptr as usize }, 4200 0usize, 4201 concat!( 4202 "Offset of field: ", 4203 stringify!(ndb_text_search_key), 4204 "::", 4205 stringify!(str_len) 4206 ) 4207 ); 4208 assert_eq!( 4209 unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize }, 4210 8usize, 4211 concat!( 4212 "Offset of field: ", 4213 stringify!(ndb_text_search_key), 4214 "::", 4215 stringify!(str_) 4216 ) 4217 ); 4218 assert_eq!( 4219 unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, 4220 16usize, 4221 concat!( 4222 "Offset of field: ", 4223 stringify!(ndb_text_search_key), 4224 "::", 4225 stringify!(timestamp) 4226 ) 4227 ); 4228 assert_eq!( 4229 unsafe { ::std::ptr::addr_of!((*ptr).note_id) as usize - ptr as usize }, 4230 24usize, 4231 concat!( 4232 "Offset of field: ", 4233 stringify!(ndb_text_search_key), 4234 "::", 4235 stringify!(note_id) 4236 ) 4237 ); 4238 assert_eq!( 4239 unsafe { ::std::ptr::addr_of!((*ptr).word_index) as usize - ptr as usize }, 4240 32usize, 4241 concat!( 4242 "Offset of field: ", 4243 stringify!(ndb_text_search_key), 4244 "::", 4245 stringify!(word_index) 4246 ) 4247 ); 4248 } 4249 #[repr(C)] 4250 #[derive(Debug, Copy, Clone)] 4251 pub struct ndb_text_search_result { 4252 pub key: ndb_text_search_key, 4253 pub prefix_chars: ::std::os::raw::c_int, 4254 pub note: *mut ndb_note, 4255 pub note_size: u64, 4256 } 4257 #[test] 4258 fn bindgen_test_layout_ndb_text_search_result() { 4259 const UNINIT: ::std::mem::MaybeUninit<ndb_text_search_result> = 4260 ::std::mem::MaybeUninit::uninit(); 4261 let ptr = UNINIT.as_ptr(); 4262 assert_eq!( 4263 ::std::mem::size_of::<ndb_text_search_result>(), 4264 64usize, 4265 concat!("Size of: ", stringify!(ndb_text_search_result)) 4266 ); 4267 assert_eq!( 4268 ::std::mem::align_of::<ndb_text_search_result>(), 4269 8usize, 4270 concat!("Alignment of ", stringify!(ndb_text_search_result)) 4271 ); 4272 assert_eq!( 4273 unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, 4274 0usize, 4275 concat!( 4276 "Offset of field: ", 4277 stringify!(ndb_text_search_result), 4278 "::", 4279 stringify!(key) 4280 ) 4281 ); 4282 assert_eq!( 4283 unsafe { ::std::ptr::addr_of!((*ptr).prefix_chars) as usize - ptr as usize }, 4284 40usize, 4285 concat!( 4286 "Offset of field: ", 4287 stringify!(ndb_text_search_result), 4288 "::", 4289 stringify!(prefix_chars) 4290 ) 4291 ); 4292 assert_eq!( 4293 unsafe { ::std::ptr::addr_of!((*ptr).note) as usize - ptr as usize }, 4294 48usize, 4295 concat!( 4296 "Offset of field: ", 4297 stringify!(ndb_text_search_result), 4298 "::", 4299 stringify!(note) 4300 ) 4301 ); 4302 assert_eq!( 4303 unsafe { ::std::ptr::addr_of!((*ptr).note_size) as usize - ptr as usize }, 4304 56usize, 4305 concat!( 4306 "Offset of field: ", 4307 stringify!(ndb_text_search_result), 4308 "::", 4309 stringify!(note_size) 4310 ) 4311 ); 4312 } 4313 #[repr(C)] 4314 #[derive(Debug, Copy, Clone)] 4315 pub struct ndb_text_search_results { 4316 pub results: [ndb_text_search_result; 128usize], 4317 pub num_results: ::std::os::raw::c_int, 4318 } 4319 #[test] 4320 fn bindgen_test_layout_ndb_text_search_results() { 4321 const UNINIT: ::std::mem::MaybeUninit<ndb_text_search_results> = 4322 ::std::mem::MaybeUninit::uninit(); 4323 let ptr = UNINIT.as_ptr(); 4324 assert_eq!( 4325 ::std::mem::size_of::<ndb_text_search_results>(), 4326 8200usize, 4327 concat!("Size of: ", stringify!(ndb_text_search_results)) 4328 ); 4329 assert_eq!( 4330 ::std::mem::align_of::<ndb_text_search_results>(), 4331 8usize, 4332 concat!("Alignment of ", stringify!(ndb_text_search_results)) 4333 ); 4334 assert_eq!( 4335 unsafe { ::std::ptr::addr_of!((*ptr).results) as usize - ptr as usize }, 4336 0usize, 4337 concat!( 4338 "Offset of field: ", 4339 stringify!(ndb_text_search_results), 4340 "::", 4341 stringify!(results) 4342 ) 4343 ); 4344 assert_eq!( 4345 unsafe { ::std::ptr::addr_of!((*ptr).num_results) as usize - ptr as usize }, 4346 8192usize, 4347 concat!( 4348 "Offset of field: ", 4349 stringify!(ndb_text_search_results), 4350 "::", 4351 stringify!(num_results) 4352 ) 4353 ); 4354 } 4355 pub const ndb_block_type_BLOCK_HASHTAG: ndb_block_type = 1; 4356 pub const ndb_block_type_BLOCK_TEXT: ndb_block_type = 2; 4357 pub const ndb_block_type_BLOCK_MENTION_INDEX: ndb_block_type = 3; 4358 pub const ndb_block_type_BLOCK_MENTION_BECH32: ndb_block_type = 4; 4359 pub const ndb_block_type_BLOCK_URL: ndb_block_type = 5; 4360 pub const ndb_block_type_BLOCK_INVOICE: ndb_block_type = 6; 4361 pub type ndb_block_type = ::std::os::raw::c_uint; 4362 #[repr(C)] 4363 #[derive(Debug, Copy, Clone)] 4364 pub struct ndb_relays { 4365 pub relays: [ndb_str_block; 24usize], 4366 pub num_relays: ::std::os::raw::c_int, 4367 } 4368 #[test] 4369 fn bindgen_test_layout_ndb_relays() { 4370 const UNINIT: ::std::mem::MaybeUninit<ndb_relays> = ::std::mem::MaybeUninit::uninit(); 4371 let ptr = UNINIT.as_ptr(); 4372 assert_eq!( 4373 ::std::mem::size_of::<ndb_relays>(), 4374 392usize, 4375 concat!("Size of: ", stringify!(ndb_relays)) 4376 ); 4377 assert_eq!( 4378 ::std::mem::align_of::<ndb_relays>(), 4379 8usize, 4380 concat!("Alignment of ", stringify!(ndb_relays)) 4381 ); 4382 assert_eq!( 4383 unsafe { ::std::ptr::addr_of!((*ptr).relays) as usize - ptr as usize }, 4384 0usize, 4385 concat!( 4386 "Offset of field: ", 4387 stringify!(ndb_relays), 4388 "::", 4389 stringify!(relays) 4390 ) 4391 ); 4392 assert_eq!( 4393 unsafe { ::std::ptr::addr_of!((*ptr).num_relays) as usize - ptr as usize }, 4394 384usize, 4395 concat!( 4396 "Offset of field: ", 4397 stringify!(ndb_relays), 4398 "::", 4399 stringify!(num_relays) 4400 ) 4401 ); 4402 } 4403 pub const nostr_bech32_type_NOSTR_BECH32_NOTE: nostr_bech32_type = 1; 4404 pub const nostr_bech32_type_NOSTR_BECH32_NPUB: nostr_bech32_type = 2; 4405 pub const nostr_bech32_type_NOSTR_BECH32_NPROFILE: nostr_bech32_type = 3; 4406 pub const nostr_bech32_type_NOSTR_BECH32_NEVENT: nostr_bech32_type = 4; 4407 pub const nostr_bech32_type_NOSTR_BECH32_NRELAY: nostr_bech32_type = 5; 4408 pub const nostr_bech32_type_NOSTR_BECH32_NADDR: nostr_bech32_type = 6; 4409 pub const nostr_bech32_type_NOSTR_BECH32_NSEC: nostr_bech32_type = 7; 4410 pub type nostr_bech32_type = ::std::os::raw::c_uint; 4411 #[repr(C)] 4412 #[derive(Debug, Copy, Clone)] 4413 pub struct bech32_note { 4414 pub event_id: *const ::std::os::raw::c_uchar, 4415 } 4416 #[test] 4417 fn bindgen_test_layout_bech32_note() { 4418 const UNINIT: ::std::mem::MaybeUninit<bech32_note> = ::std::mem::MaybeUninit::uninit(); 4419 let ptr = UNINIT.as_ptr(); 4420 assert_eq!( 4421 ::std::mem::size_of::<bech32_note>(), 4422 8usize, 4423 concat!("Size of: ", stringify!(bech32_note)) 4424 ); 4425 assert_eq!( 4426 ::std::mem::align_of::<bech32_note>(), 4427 8usize, 4428 concat!("Alignment of ", stringify!(bech32_note)) 4429 ); 4430 assert_eq!( 4431 unsafe { ::std::ptr::addr_of!((*ptr).event_id) as usize - ptr as usize }, 4432 0usize, 4433 concat!( 4434 "Offset of field: ", 4435 stringify!(bech32_note), 4436 "::", 4437 stringify!(event_id) 4438 ) 4439 ); 4440 } 4441 #[repr(C)] 4442 #[derive(Debug, Copy, Clone)] 4443 pub struct bech32_npub { 4444 pub pubkey: *const ::std::os::raw::c_uchar, 4445 } 4446 #[test] 4447 fn bindgen_test_layout_bech32_npub() { 4448 const UNINIT: ::std::mem::MaybeUninit<bech32_npub> = ::std::mem::MaybeUninit::uninit(); 4449 let ptr = UNINIT.as_ptr(); 4450 assert_eq!( 4451 ::std::mem::size_of::<bech32_npub>(), 4452 8usize, 4453 concat!("Size of: ", stringify!(bech32_npub)) 4454 ); 4455 assert_eq!( 4456 ::std::mem::align_of::<bech32_npub>(), 4457 8usize, 4458 concat!("Alignment of ", stringify!(bech32_npub)) 4459 ); 4460 assert_eq!( 4461 unsafe { ::std::ptr::addr_of!((*ptr).pubkey) as usize - ptr as usize }, 4462 0usize, 4463 concat!( 4464 "Offset of field: ", 4465 stringify!(bech32_npub), 4466 "::", 4467 stringify!(pubkey) 4468 ) 4469 ); 4470 } 4471 #[repr(C)] 4472 #[derive(Debug, Copy, Clone)] 4473 pub struct bech32_nsec { 4474 pub nsec: *const ::std::os::raw::c_uchar, 4475 } 4476 #[test] 4477 fn bindgen_test_layout_bech32_nsec() { 4478 const UNINIT: ::std::mem::MaybeUninit<bech32_nsec> = ::std::mem::MaybeUninit::uninit(); 4479 let ptr = UNINIT.as_ptr(); 4480 assert_eq!( 4481 ::std::mem::size_of::<bech32_nsec>(), 4482 8usize, 4483 concat!("Size of: ", stringify!(bech32_nsec)) 4484 ); 4485 assert_eq!( 4486 ::std::mem::align_of::<bech32_nsec>(), 4487 8usize, 4488 concat!("Alignment of ", stringify!(bech32_nsec)) 4489 ); 4490 assert_eq!( 4491 unsafe { ::std::ptr::addr_of!((*ptr).nsec) as usize - ptr as usize }, 4492 0usize, 4493 concat!( 4494 "Offset of field: ", 4495 stringify!(bech32_nsec), 4496 "::", 4497 stringify!(nsec) 4498 ) 4499 ); 4500 } 4501 #[repr(C)] 4502 #[derive(Debug, Copy, Clone)] 4503 pub struct bech32_nevent { 4504 pub relays: ndb_relays, 4505 pub event_id: *const ::std::os::raw::c_uchar, 4506 pub pubkey: *const ::std::os::raw::c_uchar, 4507 } 4508 #[test] 4509 fn bindgen_test_layout_bech32_nevent() { 4510 const UNINIT: ::std::mem::MaybeUninit<bech32_nevent> = ::std::mem::MaybeUninit::uninit(); 4511 let ptr = UNINIT.as_ptr(); 4512 assert_eq!( 4513 ::std::mem::size_of::<bech32_nevent>(), 4514 408usize, 4515 concat!("Size of: ", stringify!(bech32_nevent)) 4516 ); 4517 assert_eq!( 4518 ::std::mem::align_of::<bech32_nevent>(), 4519 8usize, 4520 concat!("Alignment of ", stringify!(bech32_nevent)) 4521 ); 4522 assert_eq!( 4523 unsafe { ::std::ptr::addr_of!((*ptr).relays) as usize - ptr as usize }, 4524 0usize, 4525 concat!( 4526 "Offset of field: ", 4527 stringify!(bech32_nevent), 4528 "::", 4529 stringify!(relays) 4530 ) 4531 ); 4532 assert_eq!( 4533 unsafe { ::std::ptr::addr_of!((*ptr).event_id) as usize - ptr as usize }, 4534 392usize, 4535 concat!( 4536 "Offset of field: ", 4537 stringify!(bech32_nevent), 4538 "::", 4539 stringify!(event_id) 4540 ) 4541 ); 4542 assert_eq!( 4543 unsafe { ::std::ptr::addr_of!((*ptr).pubkey) as usize - ptr as usize }, 4544 400usize, 4545 concat!( 4546 "Offset of field: ", 4547 stringify!(bech32_nevent), 4548 "::", 4549 stringify!(pubkey) 4550 ) 4551 ); 4552 } 4553 #[repr(C)] 4554 #[derive(Debug, Copy, Clone)] 4555 pub struct bech32_nprofile { 4556 pub relays: ndb_relays, 4557 pub pubkey: *const ::std::os::raw::c_uchar, 4558 } 4559 #[test] 4560 fn bindgen_test_layout_bech32_nprofile() { 4561 const UNINIT: ::std::mem::MaybeUninit<bech32_nprofile> = ::std::mem::MaybeUninit::uninit(); 4562 let ptr = UNINIT.as_ptr(); 4563 assert_eq!( 4564 ::std::mem::size_of::<bech32_nprofile>(), 4565 400usize, 4566 concat!("Size of: ", stringify!(bech32_nprofile)) 4567 ); 4568 assert_eq!( 4569 ::std::mem::align_of::<bech32_nprofile>(), 4570 8usize, 4571 concat!("Alignment of ", stringify!(bech32_nprofile)) 4572 ); 4573 assert_eq!( 4574 unsafe { ::std::ptr::addr_of!((*ptr).relays) as usize - ptr as usize }, 4575 0usize, 4576 concat!( 4577 "Offset of field: ", 4578 stringify!(bech32_nprofile), 4579 "::", 4580 stringify!(relays) 4581 ) 4582 ); 4583 assert_eq!( 4584 unsafe { ::std::ptr::addr_of!((*ptr).pubkey) as usize - ptr as usize }, 4585 392usize, 4586 concat!( 4587 "Offset of field: ", 4588 stringify!(bech32_nprofile), 4589 "::", 4590 stringify!(pubkey) 4591 ) 4592 ); 4593 } 4594 #[repr(C)] 4595 #[derive(Debug, Copy, Clone)] 4596 pub struct bech32_naddr { 4597 pub relays: ndb_relays, 4598 pub identifier: ndb_str_block, 4599 pub pubkey: *const ::std::os::raw::c_uchar, 4600 } 4601 #[test] 4602 fn bindgen_test_layout_bech32_naddr() { 4603 const UNINIT: ::std::mem::MaybeUninit<bech32_naddr> = ::std::mem::MaybeUninit::uninit(); 4604 let ptr = UNINIT.as_ptr(); 4605 assert_eq!( 4606 ::std::mem::size_of::<bech32_naddr>(), 4607 416usize, 4608 concat!("Size of: ", stringify!(bech32_naddr)) 4609 ); 4610 assert_eq!( 4611 ::std::mem::align_of::<bech32_naddr>(), 4612 8usize, 4613 concat!("Alignment of ", stringify!(bech32_naddr)) 4614 ); 4615 assert_eq!( 4616 unsafe { ::std::ptr::addr_of!((*ptr).relays) as usize - ptr as usize }, 4617 0usize, 4618 concat!( 4619 "Offset of field: ", 4620 stringify!(bech32_naddr), 4621 "::", 4622 stringify!(relays) 4623 ) 4624 ); 4625 assert_eq!( 4626 unsafe { ::std::ptr::addr_of!((*ptr).identifier) as usize - ptr as usize }, 4627 392usize, 4628 concat!( 4629 "Offset of field: ", 4630 stringify!(bech32_naddr), 4631 "::", 4632 stringify!(identifier) 4633 ) 4634 ); 4635 assert_eq!( 4636 unsafe { ::std::ptr::addr_of!((*ptr).pubkey) as usize - ptr as usize }, 4637 408usize, 4638 concat!( 4639 "Offset of field: ", 4640 stringify!(bech32_naddr), 4641 "::", 4642 stringify!(pubkey) 4643 ) 4644 ); 4645 } 4646 #[repr(C)] 4647 #[derive(Debug, Copy, Clone)] 4648 pub struct bech32_nrelay { 4649 pub relay: ndb_str_block, 4650 } 4651 #[test] 4652 fn bindgen_test_layout_bech32_nrelay() { 4653 const UNINIT: ::std::mem::MaybeUninit<bech32_nrelay> = ::std::mem::MaybeUninit::uninit(); 4654 let ptr = UNINIT.as_ptr(); 4655 assert_eq!( 4656 ::std::mem::size_of::<bech32_nrelay>(), 4657 16usize, 4658 concat!("Size of: ", stringify!(bech32_nrelay)) 4659 ); 4660 assert_eq!( 4661 ::std::mem::align_of::<bech32_nrelay>(), 4662 8usize, 4663 concat!("Alignment of ", stringify!(bech32_nrelay)) 4664 ); 4665 assert_eq!( 4666 unsafe { ::std::ptr::addr_of!((*ptr).relay) as usize - ptr as usize }, 4667 0usize, 4668 concat!( 4669 "Offset of field: ", 4670 stringify!(bech32_nrelay), 4671 "::", 4672 stringify!(relay) 4673 ) 4674 ); 4675 } 4676 #[repr(C)] 4677 #[derive(Copy, Clone)] 4678 pub struct nostr_bech32 { 4679 pub type_: nostr_bech32_type, 4680 pub __bindgen_anon_1: nostr_bech32__bindgen_ty_1, 4681 } 4682 #[repr(C)] 4683 #[derive(Copy, Clone)] 4684 pub union nostr_bech32__bindgen_ty_1 { 4685 pub note: bech32_note, 4686 pub npub: bech32_npub, 4687 pub nsec: bech32_nsec, 4688 pub nevent: bech32_nevent, 4689 pub nprofile: bech32_nprofile, 4690 pub naddr: bech32_naddr, 4691 pub nrelay: bech32_nrelay, 4692 } 4693 #[test] 4694 fn bindgen_test_layout_nostr_bech32__bindgen_ty_1() { 4695 const UNINIT: ::std::mem::MaybeUninit<nostr_bech32__bindgen_ty_1> = 4696 ::std::mem::MaybeUninit::uninit(); 4697 let ptr = UNINIT.as_ptr(); 4698 assert_eq!( 4699 ::std::mem::size_of::<nostr_bech32__bindgen_ty_1>(), 4700 416usize, 4701 concat!("Size of: ", stringify!(nostr_bech32__bindgen_ty_1)) 4702 ); 4703 assert_eq!( 4704 ::std::mem::align_of::<nostr_bech32__bindgen_ty_1>(), 4705 8usize, 4706 concat!("Alignment of ", stringify!(nostr_bech32__bindgen_ty_1)) 4707 ); 4708 assert_eq!( 4709 unsafe { ::std::ptr::addr_of!((*ptr).note) as usize - ptr as usize }, 4710 0usize, 4711 concat!( 4712 "Offset of field: ", 4713 stringify!(nostr_bech32__bindgen_ty_1), 4714 "::", 4715 stringify!(note) 4716 ) 4717 ); 4718 assert_eq!( 4719 unsafe { ::std::ptr::addr_of!((*ptr).npub) as usize - ptr as usize }, 4720 0usize, 4721 concat!( 4722 "Offset of field: ", 4723 stringify!(nostr_bech32__bindgen_ty_1), 4724 "::", 4725 stringify!(npub) 4726 ) 4727 ); 4728 assert_eq!( 4729 unsafe { ::std::ptr::addr_of!((*ptr).nsec) as usize - ptr as usize }, 4730 0usize, 4731 concat!( 4732 "Offset of field: ", 4733 stringify!(nostr_bech32__bindgen_ty_1), 4734 "::", 4735 stringify!(nsec) 4736 ) 4737 ); 4738 assert_eq!( 4739 unsafe { ::std::ptr::addr_of!((*ptr).nevent) as usize - ptr as usize }, 4740 0usize, 4741 concat!( 4742 "Offset of field: ", 4743 stringify!(nostr_bech32__bindgen_ty_1), 4744 "::", 4745 stringify!(nevent) 4746 ) 4747 ); 4748 assert_eq!( 4749 unsafe { ::std::ptr::addr_of!((*ptr).nprofile) as usize - ptr as usize }, 4750 0usize, 4751 concat!( 4752 "Offset of field: ", 4753 stringify!(nostr_bech32__bindgen_ty_1), 4754 "::", 4755 stringify!(nprofile) 4756 ) 4757 ); 4758 assert_eq!( 4759 unsafe { ::std::ptr::addr_of!((*ptr).naddr) as usize - ptr as usize }, 4760 0usize, 4761 concat!( 4762 "Offset of field: ", 4763 stringify!(nostr_bech32__bindgen_ty_1), 4764 "::", 4765 stringify!(naddr) 4766 ) 4767 ); 4768 assert_eq!( 4769 unsafe { ::std::ptr::addr_of!((*ptr).nrelay) as usize - ptr as usize }, 4770 0usize, 4771 concat!( 4772 "Offset of field: ", 4773 stringify!(nostr_bech32__bindgen_ty_1), 4774 "::", 4775 stringify!(nrelay) 4776 ) 4777 ); 4778 } 4779 #[test] 4780 fn bindgen_test_layout_nostr_bech32() { 4781 const UNINIT: ::std::mem::MaybeUninit<nostr_bech32> = ::std::mem::MaybeUninit::uninit(); 4782 let ptr = UNINIT.as_ptr(); 4783 assert_eq!( 4784 ::std::mem::size_of::<nostr_bech32>(), 4785 424usize, 4786 concat!("Size of: ", stringify!(nostr_bech32)) 4787 ); 4788 assert_eq!( 4789 ::std::mem::align_of::<nostr_bech32>(), 4790 8usize, 4791 concat!("Alignment of ", stringify!(nostr_bech32)) 4792 ); 4793 assert_eq!( 4794 unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4795 0usize, 4796 concat!( 4797 "Offset of field: ", 4798 stringify!(nostr_bech32), 4799 "::", 4800 stringify!(type_) 4801 ) 4802 ); 4803 } 4804 #[repr(C)] 4805 #[derive(Copy, Clone)] 4806 pub struct ndb_mention_bech32_block { 4807 pub str_: ndb_str_block, 4808 pub bech32: nostr_bech32, 4809 } 4810 #[test] 4811 fn bindgen_test_layout_ndb_mention_bech32_block() { 4812 const UNINIT: ::std::mem::MaybeUninit<ndb_mention_bech32_block> = 4813 ::std::mem::MaybeUninit::uninit(); 4814 let ptr = UNINIT.as_ptr(); 4815 assert_eq!( 4816 ::std::mem::size_of::<ndb_mention_bech32_block>(), 4817 440usize, 4818 concat!("Size of: ", stringify!(ndb_mention_bech32_block)) 4819 ); 4820 assert_eq!( 4821 ::std::mem::align_of::<ndb_mention_bech32_block>(), 4822 8usize, 4823 concat!("Alignment of ", stringify!(ndb_mention_bech32_block)) 4824 ); 4825 assert_eq!( 4826 unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize }, 4827 0usize, 4828 concat!( 4829 "Offset of field: ", 4830 stringify!(ndb_mention_bech32_block), 4831 "::", 4832 stringify!(str_) 4833 ) 4834 ); 4835 assert_eq!( 4836 unsafe { ::std::ptr::addr_of!((*ptr).bech32) as usize - ptr as usize }, 4837 16usize, 4838 concat!( 4839 "Offset of field: ", 4840 stringify!(ndb_mention_bech32_block), 4841 "::", 4842 stringify!(bech32) 4843 ) 4844 ); 4845 } 4846 #[repr(C)] 4847 #[derive(Debug, Copy, Clone)] 4848 pub struct ndb_invoice { 4849 pub version: ::std::os::raw::c_uchar, 4850 pub amount: u64, 4851 pub timestamp: u64, 4852 pub expiry: u64, 4853 pub description: *mut ::std::os::raw::c_char, 4854 pub description_hash: *mut ::std::os::raw::c_uchar, 4855 } 4856 #[test] 4857 fn bindgen_test_layout_ndb_invoice() { 4858 const UNINIT: ::std::mem::MaybeUninit<ndb_invoice> = ::std::mem::MaybeUninit::uninit(); 4859 let ptr = UNINIT.as_ptr(); 4860 assert_eq!( 4861 ::std::mem::size_of::<ndb_invoice>(), 4862 48usize, 4863 concat!("Size of: ", stringify!(ndb_invoice)) 4864 ); 4865 assert_eq!( 4866 ::std::mem::align_of::<ndb_invoice>(), 4867 8usize, 4868 concat!("Alignment of ", stringify!(ndb_invoice)) 4869 ); 4870 assert_eq!( 4871 unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 4872 0usize, 4873 concat!( 4874 "Offset of field: ", 4875 stringify!(ndb_invoice), 4876 "::", 4877 stringify!(version) 4878 ) 4879 ); 4880 assert_eq!( 4881 unsafe { ::std::ptr::addr_of!((*ptr).amount) as usize - ptr as usize }, 4882 8usize, 4883 concat!( 4884 "Offset of field: ", 4885 stringify!(ndb_invoice), 4886 "::", 4887 stringify!(amount) 4888 ) 4889 ); 4890 assert_eq!( 4891 unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, 4892 16usize, 4893 concat!( 4894 "Offset of field: ", 4895 stringify!(ndb_invoice), 4896 "::", 4897 stringify!(timestamp) 4898 ) 4899 ); 4900 assert_eq!( 4901 unsafe { ::std::ptr::addr_of!((*ptr).expiry) as usize - ptr as usize }, 4902 24usize, 4903 concat!( 4904 "Offset of field: ", 4905 stringify!(ndb_invoice), 4906 "::", 4907 stringify!(expiry) 4908 ) 4909 ); 4910 assert_eq!( 4911 unsafe { ::std::ptr::addr_of!((*ptr).description) as usize - ptr as usize }, 4912 32usize, 4913 concat!( 4914 "Offset of field: ", 4915 stringify!(ndb_invoice), 4916 "::", 4917 stringify!(description) 4918 ) 4919 ); 4920 assert_eq!( 4921 unsafe { ::std::ptr::addr_of!((*ptr).description_hash) as usize - ptr as usize }, 4922 40usize, 4923 concat!( 4924 "Offset of field: ", 4925 stringify!(ndb_invoice), 4926 "::", 4927 stringify!(description_hash) 4928 ) 4929 ); 4930 } 4931 #[repr(C)] 4932 #[derive(Debug, Copy, Clone)] 4933 pub struct ndb_invoice_block { 4934 pub invstr: ndb_str_block, 4935 pub invoice: ndb_invoice, 4936 } 4937 #[test] 4938 fn bindgen_test_layout_ndb_invoice_block() { 4939 const UNINIT: ::std::mem::MaybeUninit<ndb_invoice_block> = ::std::mem::MaybeUninit::uninit(); 4940 let ptr = UNINIT.as_ptr(); 4941 assert_eq!( 4942 ::std::mem::size_of::<ndb_invoice_block>(), 4943 64usize, 4944 concat!("Size of: ", stringify!(ndb_invoice_block)) 4945 ); 4946 assert_eq!( 4947 ::std::mem::align_of::<ndb_invoice_block>(), 4948 8usize, 4949 concat!("Alignment of ", stringify!(ndb_invoice_block)) 4950 ); 4951 assert_eq!( 4952 unsafe { ::std::ptr::addr_of!((*ptr).invstr) as usize - ptr as usize }, 4953 0usize, 4954 concat!( 4955 "Offset of field: ", 4956 stringify!(ndb_invoice_block), 4957 "::", 4958 stringify!(invstr) 4959 ) 4960 ); 4961 assert_eq!( 4962 unsafe { ::std::ptr::addr_of!((*ptr).invoice) as usize - ptr as usize }, 4963 16usize, 4964 concat!( 4965 "Offset of field: ", 4966 stringify!(ndb_invoice_block), 4967 "::", 4968 stringify!(invoice) 4969 ) 4970 ); 4971 } 4972 #[repr(C)] 4973 #[derive(Copy, Clone)] 4974 pub struct ndb_block { 4975 pub type_: ndb_block_type, 4976 pub block: ndb_block__bindgen_ty_1, 4977 } 4978 #[repr(C)] 4979 #[derive(Copy, Clone)] 4980 pub union ndb_block__bindgen_ty_1 { 4981 pub str_: ndb_str_block, 4982 pub invoice: ndb_invoice_block, 4983 pub mention_bech32: ndb_mention_bech32_block, 4984 pub mention_index: u32, 4985 } 4986 #[test] 4987 fn bindgen_test_layout_ndb_block__bindgen_ty_1() { 4988 const UNINIT: ::std::mem::MaybeUninit<ndb_block__bindgen_ty_1> = 4989 ::std::mem::MaybeUninit::uninit(); 4990 let ptr = UNINIT.as_ptr(); 4991 assert_eq!( 4992 ::std::mem::size_of::<ndb_block__bindgen_ty_1>(), 4993 440usize, 4994 concat!("Size of: ", stringify!(ndb_block__bindgen_ty_1)) 4995 ); 4996 assert_eq!( 4997 ::std::mem::align_of::<ndb_block__bindgen_ty_1>(), 4998 8usize, 4999 concat!("Alignment of ", stringify!(ndb_block__bindgen_ty_1)) 5000 ); 5001 assert_eq!( 5002 unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize }, 5003 0usize, 5004 concat!( 5005 "Offset of field: ", 5006 stringify!(ndb_block__bindgen_ty_1), 5007 "::", 5008 stringify!(str_) 5009 ) 5010 ); 5011 assert_eq!( 5012 unsafe { ::std::ptr::addr_of!((*ptr).invoice) as usize - ptr as usize }, 5013 0usize, 5014 concat!( 5015 "Offset of field: ", 5016 stringify!(ndb_block__bindgen_ty_1), 5017 "::", 5018 stringify!(invoice) 5019 ) 5020 ); 5021 assert_eq!( 5022 unsafe { ::std::ptr::addr_of!((*ptr).mention_bech32) as usize - ptr as usize }, 5023 0usize, 5024 concat!( 5025 "Offset of field: ", 5026 stringify!(ndb_block__bindgen_ty_1), 5027 "::", 5028 stringify!(mention_bech32) 5029 ) 5030 ); 5031 assert_eq!( 5032 unsafe { ::std::ptr::addr_of!((*ptr).mention_index) as usize - ptr as usize }, 5033 0usize, 5034 concat!( 5035 "Offset of field: ", 5036 stringify!(ndb_block__bindgen_ty_1), 5037 "::", 5038 stringify!(mention_index) 5039 ) 5040 ); 5041 } 5042 #[test] 5043 fn bindgen_test_layout_ndb_block() { 5044 const UNINIT: ::std::mem::MaybeUninit<ndb_block> = ::std::mem::MaybeUninit::uninit(); 5045 let ptr = UNINIT.as_ptr(); 5046 assert_eq!( 5047 ::std::mem::size_of::<ndb_block>(), 5048 448usize, 5049 concat!("Size of: ", stringify!(ndb_block)) 5050 ); 5051 assert_eq!( 5052 ::std::mem::align_of::<ndb_block>(), 5053 8usize, 5054 concat!("Alignment of ", stringify!(ndb_block)) 5055 ); 5056 assert_eq!( 5057 unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 5058 0usize, 5059 concat!( 5060 "Offset of field: ", 5061 stringify!(ndb_block), 5062 "::", 5063 stringify!(type_) 5064 ) 5065 ); 5066 assert_eq!( 5067 unsafe { ::std::ptr::addr_of!((*ptr).block) as usize - ptr as usize }, 5068 8usize, 5069 concat!( 5070 "Offset of field: ", 5071 stringify!(ndb_block), 5072 "::", 5073 stringify!(block) 5074 ) 5075 ); 5076 } 5077 #[repr(C)] 5078 #[derive(Copy, Clone)] 5079 pub struct ndb_block_iterator { 5080 pub content: *const ::std::os::raw::c_char, 5081 pub blocks: *mut ndb_blocks, 5082 pub block: ndb_block, 5083 pub p: *mut ::std::os::raw::c_uchar, 5084 } 5085 #[test] 5086 fn bindgen_test_layout_ndb_block_iterator() { 5087 const UNINIT: ::std::mem::MaybeUninit<ndb_block_iterator> = ::std::mem::MaybeUninit::uninit(); 5088 let ptr = UNINIT.as_ptr(); 5089 assert_eq!( 5090 ::std::mem::size_of::<ndb_block_iterator>(), 5091 472usize, 5092 concat!("Size of: ", stringify!(ndb_block_iterator)) 5093 ); 5094 assert_eq!( 5095 ::std::mem::align_of::<ndb_block_iterator>(), 5096 8usize, 5097 concat!("Alignment of ", stringify!(ndb_block_iterator)) 5098 ); 5099 assert_eq!( 5100 unsafe { ::std::ptr::addr_of!((*ptr).content) as usize - ptr as usize }, 5101 0usize, 5102 concat!( 5103 "Offset of field: ", 5104 stringify!(ndb_block_iterator), 5105 "::", 5106 stringify!(content) 5107 ) 5108 ); 5109 assert_eq!( 5110 unsafe { ::std::ptr::addr_of!((*ptr).blocks) as usize - ptr as usize }, 5111 8usize, 5112 concat!( 5113 "Offset of field: ", 5114 stringify!(ndb_block_iterator), 5115 "::", 5116 stringify!(blocks) 5117 ) 5118 ); 5119 assert_eq!( 5120 unsafe { ::std::ptr::addr_of!((*ptr).block) as usize - ptr as usize }, 5121 16usize, 5122 concat!( 5123 "Offset of field: ", 5124 stringify!(ndb_block_iterator), 5125 "::", 5126 stringify!(block) 5127 ) 5128 ); 5129 assert_eq!( 5130 unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, 5131 464usize, 5132 concat!( 5133 "Offset of field: ", 5134 stringify!(ndb_block_iterator), 5135 "::", 5136 stringify!(p) 5137 ) 5138 ); 5139 } 5140 #[repr(C)] 5141 #[derive(Debug, Copy, Clone)] 5142 pub struct ndb_query_result { 5143 pub note: *mut ndb_note, 5144 pub note_size: u64, 5145 pub note_id: u64, 5146 } 5147 #[test] 5148 fn bindgen_test_layout_ndb_query_result() { 5149 const UNINIT: ::std::mem::MaybeUninit<ndb_query_result> = ::std::mem::MaybeUninit::uninit(); 5150 let ptr = UNINIT.as_ptr(); 5151 assert_eq!( 5152 ::std::mem::size_of::<ndb_query_result>(), 5153 24usize, 5154 concat!("Size of: ", stringify!(ndb_query_result)) 5155 ); 5156 assert_eq!( 5157 ::std::mem::align_of::<ndb_query_result>(), 5158 8usize, 5159 concat!("Alignment of ", stringify!(ndb_query_result)) 5160 ); 5161 assert_eq!( 5162 unsafe { ::std::ptr::addr_of!((*ptr).note) as usize - ptr as usize }, 5163 0usize, 5164 concat!( 5165 "Offset of field: ", 5166 stringify!(ndb_query_result), 5167 "::", 5168 stringify!(note) 5169 ) 5170 ); 5171 assert_eq!( 5172 unsafe { ::std::ptr::addr_of!((*ptr).note_size) as usize - ptr as usize }, 5173 8usize, 5174 concat!( 5175 "Offset of field: ", 5176 stringify!(ndb_query_result), 5177 "::", 5178 stringify!(note_size) 5179 ) 5180 ); 5181 assert_eq!( 5182 unsafe { ::std::ptr::addr_of!((*ptr).note_id) as usize - ptr as usize }, 5183 16usize, 5184 concat!( 5185 "Offset of field: ", 5186 stringify!(ndb_query_result), 5187 "::", 5188 stringify!(note_id) 5189 ) 5190 ); 5191 } 5192 #[repr(C)] 5193 #[derive(Debug, Copy, Clone)] 5194 pub struct ndb_query_results { 5195 pub cur: cursor, 5196 } 5197 #[test] 5198 fn bindgen_test_layout_ndb_query_results() { 5199 const UNINIT: ::std::mem::MaybeUninit<ndb_query_results> = ::std::mem::MaybeUninit::uninit(); 5200 let ptr = UNINIT.as_ptr(); 5201 assert_eq!( 5202 ::std::mem::size_of::<ndb_query_results>(), 5203 24usize, 5204 concat!("Size of: ", stringify!(ndb_query_results)) 5205 ); 5206 assert_eq!( 5207 ::std::mem::align_of::<ndb_query_results>(), 5208 8usize, 5209 concat!("Alignment of ", stringify!(ndb_query_results)) 5210 ); 5211 assert_eq!( 5212 unsafe { ::std::ptr::addr_of!((*ptr).cur) as usize - ptr as usize }, 5213 0usize, 5214 concat!( 5215 "Offset of field: ", 5216 stringify!(ndb_query_results), 5217 "::", 5218 stringify!(cur) 5219 ) 5220 ); 5221 } 5222 extern "C" { 5223 pub fn ndb_default_config(arg1: *mut ndb_config); 5224 } 5225 extern "C" { 5226 pub fn ndb_config_set_ingest_threads(config: *mut ndb_config, threads: ::std::os::raw::c_int); 5227 } 5228 extern "C" { 5229 pub fn ndb_config_set_flags(config: *mut ndb_config, flags: ::std::os::raw::c_int); 5230 } 5231 extern "C" { 5232 pub fn ndb_config_set_mapsize(config: *mut ndb_config, mapsize: usize); 5233 } 5234 extern "C" { 5235 pub fn ndb_config_set_ingest_filter( 5236 config: *mut ndb_config, 5237 fn_: ndb_ingest_filter_fn, 5238 arg1: *mut ::std::os::raw::c_void, 5239 ); 5240 } 5241 extern "C" { 5242 pub fn ndb_config_set_subscription_callback( 5243 config: *mut ndb_config, 5244 fn_: ndb_sub_fn, 5245 ctx: *mut ::std::os::raw::c_void, 5246 ); 5247 } 5248 extern "C" { 5249 #[doc = " Configurable scratch buffer size for the writer thread. Default is 2MB. If you have smaller notes\n you can decrease this to reduce memory usage. If you have bigger notes you should increase this so\n that the writer thread can properly parse larger notes."] 5250 pub fn ndb_config_set_writer_scratch_buffer_size( 5251 config: *mut ndb_config, 5252 scratch_size: ::std::os::raw::c_int, 5253 ); 5254 } 5255 extern "C" { 5256 pub fn ndb_calculate_id( 5257 note: *mut ndb_note, 5258 buf: *mut ::std::os::raw::c_uchar, 5259 buflen: ::std::os::raw::c_int, 5260 id: *mut ::std::os::raw::c_uchar, 5261 ) -> ::std::os::raw::c_int; 5262 } 5263 extern "C" { 5264 pub fn ndb_sign_id( 5265 keypair: *mut ndb_keypair, 5266 id: *mut ::std::os::raw::c_uchar, 5267 sig: *mut ::std::os::raw::c_uchar, 5268 ) -> ::std::os::raw::c_int; 5269 } 5270 extern "C" { 5271 pub fn ndb_create_keypair(key: *mut ndb_keypair) -> ::std::os::raw::c_int; 5272 } 5273 extern "C" { 5274 pub fn ndb_decode_key( 5275 secstr: *const ::std::os::raw::c_char, 5276 keypair: *mut ndb_keypair, 5277 ) -> ::std::os::raw::c_int; 5278 } 5279 extern "C" { 5280 pub fn ndb_note_verify( 5281 secp_ctx: *mut ::std::os::raw::c_void, 5282 scratch: *mut ::std::os::raw::c_uchar, 5283 scratch_size: usize, 5284 note: *mut ndb_note, 5285 ) -> ::std::os::raw::c_int; 5286 } 5287 extern "C" { 5288 pub fn ndb_init( 5289 ndb: *mut *mut ndb, 5290 dbdir: *const ::std::os::raw::c_char, 5291 arg1: *const ndb_config, 5292 ) -> ::std::os::raw::c_int; 5293 } 5294 extern "C" { 5295 pub fn ndb_db_version(txn: *mut ndb_txn) -> ::std::os::raw::c_int; 5296 } 5297 extern "C" { 5298 pub fn ndb_process_event( 5299 arg1: *mut ndb, 5300 json: *const ::std::os::raw::c_char, 5301 len: ::std::os::raw::c_int, 5302 ) -> ::std::os::raw::c_int; 5303 } 5304 extern "C" { 5305 pub fn ndb_ingest_meta_init( 5306 meta: *mut ndb_ingest_meta, 5307 client: ::std::os::raw::c_uint, 5308 relay: *const ::std::os::raw::c_char, 5309 ); 5310 } 5311 extern "C" { 5312 pub fn ndb_process_event_with( 5313 arg1: *mut ndb, 5314 json: *const ::std::os::raw::c_char, 5315 len: ::std::os::raw::c_int, 5316 meta: *mut ndb_ingest_meta, 5317 ) -> ::std::os::raw::c_int; 5318 } 5319 extern "C" { 5320 pub fn ndb_process_events( 5321 arg1: *mut ndb, 5322 ldjson: *const ::std::os::raw::c_char, 5323 len: usize, 5324 ) -> ::std::os::raw::c_int; 5325 } 5326 extern "C" { 5327 pub fn ndb_process_events_with( 5328 ndb: *mut ndb, 5329 ldjson: *const ::std::os::raw::c_char, 5330 json_len: usize, 5331 meta: *mut ndb_ingest_meta, 5332 ) -> ::std::os::raw::c_int; 5333 } 5334 extern "C" { 5335 pub fn ndb_process_events_stream(arg1: *mut ndb, fp: *mut FILE) -> ::std::os::raw::c_int; 5336 } 5337 extern "C" { 5338 pub fn ndb_process_client_event( 5339 arg1: *mut ndb, 5340 json: *const ::std::os::raw::c_char, 5341 len: ::std::os::raw::c_int, 5342 ) -> ::std::os::raw::c_int; 5343 } 5344 extern "C" { 5345 pub fn ndb_process_client_events( 5346 arg1: *mut ndb, 5347 json: *const ::std::os::raw::c_char, 5348 len: usize, 5349 ) -> ::std::os::raw::c_int; 5350 } 5351 extern "C" { 5352 pub fn ndb_begin_query(arg1: *mut ndb, arg2: *mut ndb_txn) -> ::std::os::raw::c_int; 5353 } 5354 extern "C" { 5355 pub fn ndb_search_profile( 5356 txn: *mut ndb_txn, 5357 search: *mut ndb_search, 5358 query: *const ::std::os::raw::c_char, 5359 ) -> ::std::os::raw::c_int; 5360 } 5361 extern "C" { 5362 pub fn ndb_search_profile_next(search: *mut ndb_search) -> ::std::os::raw::c_int; 5363 } 5364 extern "C" { 5365 pub fn ndb_search_profile_end(search: *mut ndb_search); 5366 } 5367 extern "C" { 5368 pub fn ndb_end_query(arg1: *mut ndb_txn) -> ::std::os::raw::c_int; 5369 } 5370 extern "C" { 5371 pub fn ndb_write_last_profile_fetch( 5372 ndb: *mut ndb, 5373 pubkey: *const ::std::os::raw::c_uchar, 5374 fetched_at: u64, 5375 ) -> ::std::os::raw::c_int; 5376 } 5377 extern "C" { 5378 pub fn ndb_read_last_profile_fetch( 5379 txn: *mut ndb_txn, 5380 pubkey: *const ::std::os::raw::c_uchar, 5381 ) -> u64; 5382 } 5383 extern "C" { 5384 pub fn ndb_get_profile_by_pubkey( 5385 txn: *mut ndb_txn, 5386 pubkey: *const ::std::os::raw::c_uchar, 5387 len: *mut usize, 5388 primkey: *mut u64, 5389 ) -> *mut ::std::os::raw::c_void; 5390 } 5391 extern "C" { 5392 pub fn ndb_get_profile_by_key( 5393 txn: *mut ndb_txn, 5394 key: u64, 5395 len: *mut usize, 5396 ) -> *mut ::std::os::raw::c_void; 5397 } 5398 extern "C" { 5399 pub fn ndb_get_notekey_by_id(txn: *mut ndb_txn, id: *const ::std::os::raw::c_uchar) -> u64; 5400 } 5401 extern "C" { 5402 pub fn ndb_get_profilekey_by_pubkey( 5403 txn: *mut ndb_txn, 5404 id: *const ::std::os::raw::c_uchar, 5405 ) -> u64; 5406 } 5407 extern "C" { 5408 pub fn ndb_get_note_by_id( 5409 txn: *mut ndb_txn, 5410 id: *const ::std::os::raw::c_uchar, 5411 len: *mut usize, 5412 primkey: *mut u64, 5413 ) -> *mut ndb_note; 5414 } 5415 extern "C" { 5416 pub fn ndb_get_note_by_key(txn: *mut ndb_txn, key: u64, len: *mut usize) -> *mut ndb_note; 5417 } 5418 extern "C" { 5419 pub fn ndb_note_seen_on_relay( 5420 txn: *mut ndb_txn, 5421 note_key: u64, 5422 relay: *const ::std::os::raw::c_char, 5423 ) -> ::std::os::raw::c_int; 5424 } 5425 extern "C" { 5426 pub fn ndb_destroy(arg1: *mut ndb); 5427 } 5428 extern "C" { 5429 pub fn ndb_parse_json_note( 5430 arg1: *mut ndb_json_parser, 5431 arg2: *mut *mut ndb_note, 5432 ) -> ::std::os::raw::c_int; 5433 } 5434 extern "C" { 5435 pub fn ndb_client_event_from_json( 5436 json: *const ::std::os::raw::c_char, 5437 len: ::std::os::raw::c_int, 5438 fce: *mut ndb_fce, 5439 buf: *mut ::std::os::raw::c_uchar, 5440 bufsize: ::std::os::raw::c_int, 5441 cb: *mut ndb_id_cb, 5442 ) -> ::std::os::raw::c_int; 5443 } 5444 extern "C" { 5445 pub fn ndb_ws_event_from_json( 5446 json: *const ::std::os::raw::c_char, 5447 len: ::std::os::raw::c_int, 5448 tce: *mut ndb_tce, 5449 buf: *mut ::std::os::raw::c_uchar, 5450 bufsize: ::std::os::raw::c_int, 5451 arg1: *mut ndb_id_cb, 5452 ) -> ::std::os::raw::c_int; 5453 } 5454 extern "C" { 5455 pub fn ndb_note_from_json( 5456 json: *const ::std::os::raw::c_char, 5457 len: ::std::os::raw::c_int, 5458 arg1: *mut *mut ndb_note, 5459 buf: *mut ::std::os::raw::c_uchar, 5460 buflen: ::std::os::raw::c_int, 5461 ) -> ::std::os::raw::c_int; 5462 } 5463 extern "C" { 5464 pub fn ndb_builder_init( 5465 builder: *mut ndb_builder, 5466 buf: *mut ::std::os::raw::c_uchar, 5467 bufsize: usize, 5468 ) -> ::std::os::raw::c_int; 5469 } 5470 extern "C" { 5471 pub fn ndb_builder_finalize( 5472 builder: *mut ndb_builder, 5473 note: *mut *mut ndb_note, 5474 privkey: *mut ndb_keypair, 5475 ) -> ::std::os::raw::c_int; 5476 } 5477 extern "C" { 5478 pub fn ndb_builder_set_content( 5479 builder: *mut ndb_builder, 5480 content: *const ::std::os::raw::c_char, 5481 len: ::std::os::raw::c_int, 5482 ) -> ::std::os::raw::c_int; 5483 } 5484 extern "C" { 5485 pub fn ndb_builder_set_created_at(builder: *mut ndb_builder, created_at: u64); 5486 } 5487 extern "C" { 5488 pub fn ndb_builder_set_sig(builder: *mut ndb_builder, sig: *mut ::std::os::raw::c_uchar); 5489 } 5490 extern "C" { 5491 pub fn ndb_builder_set_pubkey(builder: *mut ndb_builder, pubkey: *mut ::std::os::raw::c_uchar); 5492 } 5493 extern "C" { 5494 pub fn ndb_builder_set_id(builder: *mut ndb_builder, id: *mut ::std::os::raw::c_uchar); 5495 } 5496 extern "C" { 5497 pub fn ndb_builder_set_kind(builder: *mut ndb_builder, kind: u32); 5498 } 5499 extern "C" { 5500 pub fn ndb_builder_new_tag(builder: *mut ndb_builder) -> ::std::os::raw::c_int; 5501 } 5502 extern "C" { 5503 pub fn ndb_builder_push_tag_str( 5504 builder: *mut ndb_builder, 5505 str_: *const ::std::os::raw::c_char, 5506 len: ::std::os::raw::c_int, 5507 ) -> ::std::os::raw::c_int; 5508 } 5509 extern "C" { 5510 pub fn ndb_builder_push_tag_id( 5511 builder: *mut ndb_builder, 5512 id: *mut ::std::os::raw::c_uchar, 5513 ) -> ::std::os::raw::c_int; 5514 } 5515 extern "C" { 5516 pub fn ndb_filter_init(arg1: *mut ndb_filter) -> ::std::os::raw::c_int; 5517 } 5518 extern "C" { 5519 #[doc = " Allocate a filter with a fixed sized buffer (where pages is number of 4096-byte sized blocks)\n You can set pages to 1 if you know you are constructing small filters"] 5520 pub fn ndb_filter_init_with( 5521 filter: *mut ndb_filter, 5522 pages: ::std::os::raw::c_int, 5523 ) -> ::std::os::raw::c_int; 5524 } 5525 extern "C" { 5526 pub fn ndb_filter_add_id_element( 5527 arg1: *mut ndb_filter, 5528 id: *const ::std::os::raw::c_uchar, 5529 ) -> ::std::os::raw::c_int; 5530 } 5531 extern "C" { 5532 pub fn ndb_filter_add_int_element(arg1: *mut ndb_filter, integer: u64) 5533 -> ::std::os::raw::c_int; 5534 } 5535 extern "C" { 5536 pub fn ndb_filter_add_str_element( 5537 arg1: *mut ndb_filter, 5538 str_: *const ::std::os::raw::c_char, 5539 ) -> ::std::os::raw::c_int; 5540 } 5541 extern "C" { 5542 pub fn ndb_filter_add_custom_filter_element( 5543 filter: *mut ndb_filter, 5544 cb: ndb_filter_callback_fn, 5545 ctx: *mut ::std::os::raw::c_void, 5546 ) -> ::std::os::raw::c_int; 5547 } 5548 extern "C" { 5549 pub fn ndb_filter_eq(arg1: *const ndb_filter, arg2: *const ndb_filter) 5550 -> ::std::os::raw::c_int; 5551 } 5552 extern "C" { 5553 #[doc = " is `a` a subset of `b`"] 5554 pub fn ndb_filter_is_subset_of( 5555 a: *const ndb_filter, 5556 b: *const ndb_filter, 5557 ) -> ::std::os::raw::c_int; 5558 } 5559 extern "C" { 5560 pub fn ndb_filter_from_json( 5561 arg1: *const ::std::os::raw::c_char, 5562 len: ::std::os::raw::c_int, 5563 filter: *mut ndb_filter, 5564 buf: *mut ::std::os::raw::c_uchar, 5565 bufsize: ::std::os::raw::c_int, 5566 ) -> ::std::os::raw::c_int; 5567 } 5568 extern "C" { 5569 pub fn ndb_filter_get_id_element( 5570 arg1: *const ndb_filter, 5571 arg2: *const ndb_filter_elements, 5572 index: ::std::os::raw::c_int, 5573 ) -> *mut ::std::os::raw::c_uchar; 5574 } 5575 extern "C" { 5576 pub fn ndb_filter_get_string_element( 5577 arg1: *const ndb_filter, 5578 arg2: *const ndb_filter_elements, 5579 index: ::std::os::raw::c_int, 5580 ) -> *const ::std::os::raw::c_char; 5581 } 5582 extern "C" { 5583 pub fn ndb_filter_get_int_element( 5584 arg1: *const ndb_filter_elements, 5585 index: ::std::os::raw::c_int, 5586 ) -> u64; 5587 } 5588 extern "C" { 5589 pub fn ndb_filter_get_int_element_ptr( 5590 arg1: *mut ndb_filter_elements, 5591 index: ::std::os::raw::c_int, 5592 ) -> *mut u64; 5593 } 5594 extern "C" { 5595 pub fn ndb_filter_current_element(arg1: *const ndb_filter) -> *mut ndb_filter_elements; 5596 } 5597 extern "C" { 5598 pub fn ndb_filter_get_elements( 5599 arg1: *const ndb_filter, 5600 arg2: ::std::os::raw::c_int, 5601 ) -> *mut ndb_filter_elements; 5602 } 5603 extern "C" { 5604 pub fn ndb_filter_start_field( 5605 arg1: *mut ndb_filter, 5606 arg2: ndb_filter_fieldtype, 5607 ) -> ::std::os::raw::c_int; 5608 } 5609 extern "C" { 5610 pub fn ndb_filter_start_tag_field( 5611 arg1: *mut ndb_filter, 5612 tag: ::std::os::raw::c_char, 5613 ) -> ::std::os::raw::c_int; 5614 } 5615 extern "C" { 5616 pub fn ndb_filter_matches(arg1: *mut ndb_filter, arg2: *mut ndb_note) -> ::std::os::raw::c_int; 5617 } 5618 extern "C" { 5619 pub fn ndb_filter_matches_with_relay( 5620 arg1: *mut ndb_filter, 5621 arg2: *mut ndb_note, 5622 iter: *mut ndb_note_relay_iterator, 5623 ) -> ::std::os::raw::c_int; 5624 } 5625 extern "C" { 5626 pub fn ndb_filter_clone(dst: *mut ndb_filter, src: *mut ndb_filter) -> ::std::os::raw::c_int; 5627 } 5628 extern "C" { 5629 pub fn ndb_filter_end(arg1: *mut ndb_filter) -> ::std::os::raw::c_int; 5630 } 5631 extern "C" { 5632 pub fn ndb_filter_end_field(arg1: *mut ndb_filter); 5633 } 5634 extern "C" { 5635 pub fn ndb_filter_destroy(arg1: *mut ndb_filter); 5636 } 5637 extern "C" { 5638 pub fn ndb_filter_json( 5639 arg1: *const ndb_filter, 5640 buf: *mut ::std::os::raw::c_char, 5641 buflen: ::std::os::raw::c_int, 5642 ) -> ::std::os::raw::c_int; 5643 } 5644 extern "C" { 5645 pub fn ndb_subscribe( 5646 arg1: *mut ndb, 5647 arg2: *mut ndb_filter, 5648 num_filters: ::std::os::raw::c_int, 5649 ) -> u64; 5650 } 5651 extern "C" { 5652 pub fn ndb_wait_for_notes( 5653 arg1: *mut ndb, 5654 subid: u64, 5655 note_ids: *mut u64, 5656 note_id_capacity: ::std::os::raw::c_int, 5657 ) -> ::std::os::raw::c_int; 5658 } 5659 extern "C" { 5660 pub fn ndb_poll_for_notes( 5661 arg1: *mut ndb, 5662 subid: u64, 5663 note_ids: *mut u64, 5664 note_id_capacity: ::std::os::raw::c_int, 5665 ) -> ::std::os::raw::c_int; 5666 } 5667 extern "C" { 5668 pub fn ndb_unsubscribe(arg1: *mut ndb, subid: u64) -> ::std::os::raw::c_int; 5669 } 5670 extern "C" { 5671 pub fn ndb_num_subscriptions(arg1: *mut ndb) -> ::std::os::raw::c_int; 5672 } 5673 extern "C" { 5674 pub fn ndb_text_search( 5675 txn: *mut ndb_txn, 5676 query: *const ::std::os::raw::c_char, 5677 arg1: *mut ndb_text_search_results, 5678 arg2: *mut ndb_text_search_config, 5679 ) -> ::std::os::raw::c_int; 5680 } 5681 extern "C" { 5682 pub fn ndb_text_search_with( 5683 txn: *mut ndb_txn, 5684 query: *const ::std::os::raw::c_char, 5685 arg1: *mut ndb_text_search_results, 5686 arg2: *mut ndb_text_search_config, 5687 filter: *mut ndb_filter, 5688 ) -> ::std::os::raw::c_int; 5689 } 5690 extern "C" { 5691 pub fn ndb_default_text_search_config(arg1: *mut ndb_text_search_config); 5692 } 5693 extern "C" { 5694 pub fn ndb_text_search_config_set_order( 5695 arg1: *mut ndb_text_search_config, 5696 arg2: ndb_search_order, 5697 ); 5698 } 5699 extern "C" { 5700 pub fn ndb_text_search_config_set_limit( 5701 arg1: *mut ndb_text_search_config, 5702 limit: ::std::os::raw::c_int, 5703 ); 5704 } 5705 extern "C" { 5706 pub fn ndb_query( 5707 txn: *mut ndb_txn, 5708 filters: *mut ndb_filter, 5709 num_filters: ::std::os::raw::c_int, 5710 results: *mut ndb_query_result, 5711 result_capacity: ::std::os::raw::c_int, 5712 count: *mut ::std::os::raw::c_int, 5713 ) -> ::std::os::raw::c_int; 5714 } 5715 extern "C" { 5716 pub fn ndb_note_meta_builder_init( 5717 builder: *mut ndb_note_meta_builder, 5718 arg1: *mut ::std::os::raw::c_uchar, 5719 arg2: usize, 5720 ) -> ::std::os::raw::c_int; 5721 } 5722 extern "C" { 5723 pub fn ndb_set_note_meta( 5724 ndb: *mut ndb, 5725 id: *const ::std::os::raw::c_uchar, 5726 meta: *mut ndb_note_meta, 5727 ) -> ::std::os::raw::c_int; 5728 } 5729 extern "C" { 5730 pub fn ndb_note_meta_total_size(header: *mut ndb_note_meta) -> usize; 5731 } 5732 extern "C" { 5733 pub fn ndb_get_note_meta( 5734 txn: *mut ndb_txn, 5735 id: *const ::std::os::raw::c_uchar, 5736 ) -> *mut ndb_note_meta; 5737 } 5738 extern "C" { 5739 pub fn ndb_note_meta_add_entry(builder: *mut ndb_note_meta_builder) 5740 -> *mut ndb_note_meta_entry; 5741 } 5742 extern "C" { 5743 pub fn ndb_note_meta_builder_find_entry( 5744 builder: *mut ndb_note_meta_builder, 5745 type_: u16, 5746 payload: *mut u64, 5747 ) -> *mut ndb_note_meta_entry; 5748 } 5749 extern "C" { 5750 pub fn ndb_note_meta_entries(meta: *mut ndb_note_meta) -> *mut ndb_note_meta_entry; 5751 } 5752 extern "C" { 5753 pub fn ndb_note_meta_entry_at( 5754 meta: *mut ndb_note_meta, 5755 ind: ::std::os::raw::c_int, 5756 ) -> *mut ndb_note_meta_entry; 5757 } 5758 extern "C" { 5759 pub fn ndb_note_meta_find_entry( 5760 meta: *mut ndb_note_meta, 5761 type_: u16, 5762 payload: *mut u64, 5763 ) -> *mut ndb_note_meta_entry; 5764 } 5765 extern "C" { 5766 pub fn ndb_note_meta_counts_direct_replies(entry: *mut ndb_note_meta_entry) -> *mut u16; 5767 } 5768 extern "C" { 5769 pub fn ndb_note_meta_counts_quotes(entry: *mut ndb_note_meta_entry) -> *mut u16; 5770 } 5771 extern "C" { 5772 pub fn ndb_note_meta_counts_reposts(entry: *mut ndb_note_meta_entry) -> *mut u16; 5773 } 5774 extern "C" { 5775 pub fn ndb_note_meta_entry_type(entry: *mut ndb_note_meta_entry) -> *mut u16; 5776 } 5777 extern "C" { 5778 pub fn ndb_note_meta_entries_count(meta: *mut ndb_note_meta) -> u16; 5779 } 5780 extern "C" { 5781 pub fn ndb_note_meta_counts_thread_replies(entry: *mut ndb_note_meta_entry) -> *mut u32; 5782 } 5783 extern "C" { 5784 pub fn ndb_note_meta_counts_total_reactions(entry: *mut ndb_note_meta_entry) -> *mut u32; 5785 } 5786 extern "C" { 5787 pub fn ndb_note_meta_reaction_count(entry: *mut ndb_note_meta_entry) -> *mut u32; 5788 } 5789 extern "C" { 5790 pub fn ndb_note_meta_reaction_str(entry: *mut ndb_note_meta_entry) -> *mut ndb_reaction_str; 5791 } 5792 extern "C" { 5793 pub fn ndb_note_meta_flags(meta: *mut ndb_note_meta) -> *mut u64; 5794 } 5795 extern "C" { 5796 pub fn ndb_note_meta_build(builder: *mut ndb_note_meta_builder, meta: *mut *mut ndb_note_meta); 5797 } 5798 extern "C" { 5799 pub fn ndb_note_meta_builder_resized( 5800 builder: *mut ndb_note_meta_builder, 5801 buf: *mut ::std::os::raw::c_uchar, 5802 bufsize: usize, 5803 ); 5804 } 5805 extern "C" { 5806 pub fn ndb_note_meta_counts_set( 5807 entry: *mut ndb_note_meta_entry, 5808 total_reactions: u32, 5809 quotes: u16, 5810 direct_replies: u16, 5811 thread_replies: u32, 5812 reposts: u16, 5813 ); 5814 } 5815 extern "C" { 5816 pub fn ndb_note_meta_header_init(arg1: *mut ndb_note_meta); 5817 } 5818 extern "C" { 5819 pub fn ndb_note_meta_reaction_set( 5820 entry: *mut ndb_note_meta_entry, 5821 count: u32, 5822 str_: ndb_reaction_str, 5823 ); 5824 } 5825 extern "C" { 5826 pub fn print_note_meta(meta: *mut ndb_note_meta); 5827 } 5828 extern "C" { 5829 pub fn ndb_reaction_set( 5830 reaction: *mut ndb_reaction_str, 5831 str_: *const ::std::os::raw::c_char, 5832 ) -> ::std::os::raw::c_int; 5833 } 5834 extern "C" { 5835 pub fn ndb_reaction_str_is_emoji(arg1: ndb_reaction_str) -> ::std::os::raw::c_int; 5836 } 5837 extern "C" { 5838 pub fn ndb_reaction_to_str( 5839 str_: *mut ndb_reaction_str, 5840 buf: *mut ::std::os::raw::c_char, 5841 ) -> *const ::std::os::raw::c_char; 5842 } 5843 extern "C" { 5844 pub fn ndb_stat(ndb: *mut ndb, stat: *mut ndb_stat) -> ::std::os::raw::c_int; 5845 } 5846 extern "C" { 5847 pub fn ndb_stat_counts_init(counts: *mut ndb_stat_counts); 5848 } 5849 extern "C" { 5850 pub fn ndb_note_content(note: *mut ndb_note) -> *const ::std::os::raw::c_char; 5851 } 5852 extern "C" { 5853 pub fn ndb_note_str(note: *mut ndb_note, pstr: *mut ndb_packed_str) -> ndb_str; 5854 } 5855 extern "C" { 5856 pub fn ndb_note_content_length(note: *mut ndb_note) -> u32; 5857 } 5858 extern "C" { 5859 pub fn ndb_note_created_at(note: *mut ndb_note) -> u32; 5860 } 5861 extern "C" { 5862 pub fn ndb_note_kind(note: *mut ndb_note) -> u32; 5863 } 5864 extern "C" { 5865 pub fn ndb_note_id(note: *mut ndb_note) -> *mut ::std::os::raw::c_uchar; 5866 } 5867 extern "C" { 5868 pub fn ndb_note_pubkey(note: *mut ndb_note) -> *mut ::std::os::raw::c_uchar; 5869 } 5870 extern "C" { 5871 pub fn ndb_note_sig(note: *mut ndb_note) -> *mut ::std::os::raw::c_uchar; 5872 } 5873 extern "C" { 5874 pub fn _ndb_note_set_kind(note: *mut ndb_note, kind: u32); 5875 } 5876 extern "C" { 5877 pub fn ndb_note_tags(note: *mut ndb_note) -> *mut ndb_tags; 5878 } 5879 extern "C" { 5880 pub fn ndb_str_len(str_: *mut ndb_str) -> ::std::os::raw::c_int; 5881 } 5882 extern "C" { 5883 #[doc = " write the note as json to a buffer"] 5884 pub fn ndb_note_json( 5885 arg1: *mut ndb_note, 5886 buf: *mut ::std::os::raw::c_char, 5887 buflen: ::std::os::raw::c_int, 5888 ) -> ::std::os::raw::c_int; 5889 } 5890 extern "C" { 5891 pub fn ndb_tags_iterate_start(note: *mut ndb_note, iter: *mut ndb_iterator); 5892 } 5893 extern "C" { 5894 pub fn ndb_tags_count(arg1: *mut ndb_tags) -> u16; 5895 } 5896 extern "C" { 5897 pub fn ndb_tag_count(arg1: *mut ndb_tag) -> u16; 5898 } 5899 extern "C" { 5900 pub fn ndb_tags_iterate_next(iter: *mut ndb_iterator) -> ::std::os::raw::c_int; 5901 } 5902 extern "C" { 5903 pub fn ndb_iter_tag_str(iter: *mut ndb_iterator, ind: ::std::os::raw::c_int) -> ndb_str; 5904 } 5905 extern "C" { 5906 pub fn ndb_tag_str( 5907 note: *mut ndb_note, 5908 tag: *mut ndb_tag, 5909 ind: ::std::os::raw::c_int, 5910 ) -> ndb_str; 5911 } 5912 extern "C" { 5913 pub fn ndb_note_relay_iterate_start( 5914 txn: *mut ndb_txn, 5915 iter: *mut ndb_note_relay_iterator, 5916 note_key: u64, 5917 ) -> ::std::os::raw::c_int; 5918 } 5919 extern "C" { 5920 pub fn ndb_note_relay_iterate_next( 5921 iter: *mut ndb_note_relay_iterator, 5922 ) -> *const ::std::os::raw::c_char; 5923 } 5924 extern "C" { 5925 pub fn ndb_note_relay_iterate_close(iter: *mut ndb_note_relay_iterator); 5926 } 5927 extern "C" { 5928 pub fn ndb_db_name(db: ndb_dbs) -> *const ::std::os::raw::c_char; 5929 } 5930 extern "C" { 5931 pub fn ndb_kind_name(ck: ndb_common_kind) -> *const ::std::os::raw::c_char; 5932 } 5933 extern "C" { 5934 pub fn ndb_kind_to_common_kind(kind: ::std::os::raw::c_int) -> ndb_common_kind; 5935 } 5936 extern "C" { 5937 pub fn ndb_parse_content( 5938 buf: *mut ::std::os::raw::c_uchar, 5939 buf_size: ::std::os::raw::c_int, 5940 content: *const ::std::os::raw::c_char, 5941 content_len: ::std::os::raw::c_int, 5942 blocks_p: *mut *mut ndb_blocks, 5943 ) -> ::std::os::raw::c_int; 5944 } 5945 extern "C" { 5946 pub fn ndb_get_block_type(block: *mut ndb_block) -> ndb_block_type; 5947 } 5948 extern "C" { 5949 pub fn ndb_blocks_flags(block: *mut ndb_blocks) -> ::std::os::raw::c_int; 5950 } 5951 extern "C" { 5952 pub fn ndb_blocks_total_size(blocks: *mut ndb_blocks) -> usize; 5953 } 5954 extern "C" { 5955 pub fn ndb_blocks_word_count(blocks: *mut ndb_blocks) -> ::std::os::raw::c_int; 5956 } 5957 extern "C" { 5958 #[doc = " Free blocks if they are owned, safe to call on unowned blocks as well."] 5959 pub fn ndb_blocks_free(blocks: *mut ndb_blocks); 5960 } 5961 extern "C" { 5962 pub fn ndb_get_blocks_by_key( 5963 ndb: *mut ndb, 5964 txn: *mut ndb_txn, 5965 note_key: u64, 5966 ) -> *mut ndb_blocks; 5967 } 5968 extern "C" { 5969 pub fn ndb_blocks_iterate_start( 5970 arg1: *const ::std::os::raw::c_char, 5971 arg2: *mut ndb_blocks, 5972 arg3: *mut ndb_block_iterator, 5973 ); 5974 } 5975 extern "C" { 5976 pub fn ndb_blocks_iterate_next(arg1: *mut ndb_block_iterator) -> *mut ndb_block; 5977 } 5978 extern "C" { 5979 pub fn ndb_block_str(arg1: *mut ndb_block) -> *mut ndb_str_block; 5980 } 5981 extern "C" { 5982 pub fn ndb_str_block_ptr(arg1: *mut ndb_str_block) -> *const ::std::os::raw::c_char; 5983 } 5984 extern "C" { 5985 pub fn ndb_str_block_len(arg1: *mut ndb_str_block) -> u32; 5986 } 5987 extern "C" { 5988 pub fn ndb_bech32_block(block: *mut ndb_block) -> *mut nostr_bech32; 5989 } 5990 pub const ndb_meta_clone_result_NDB_META_CLONE_FAILED: ndb_meta_clone_result = 0; 5991 pub const ndb_meta_clone_result_NDB_META_CLONE_EXISTING_ENTRY: ndb_meta_clone_result = 1; 5992 pub const ndb_meta_clone_result_NDB_META_CLONE_NEW_ENTRY: ndb_meta_clone_result = 2; 5993 pub type ndb_meta_clone_result = ::std::os::raw::c_uint; 5994 extern "C" { 5995 pub fn ndb_note_meta_clone_with_entry( 5996 meta: *mut *mut ndb_note_meta, 5997 entry: *mut *mut ndb_note_meta_entry, 5998 type_: u16, 5999 payload: *mut u64, 6000 buf: *mut ::std::os::raw::c_uchar, 6001 bufsize: usize, 6002 ) -> ndb_meta_clone_result; 6003 } 6004 #[repr(C, packed)] 6005 #[derive(Copy, Clone)] 6006 pub struct ndb_note_meta_entry { 6007 pub type_: u16, 6008 pub aux2: ndb_note_meta_entry__bindgen_ty_1, 6009 pub aux: ndb_note_meta_entry__bindgen_ty_2, 6010 pub payload: ndb_note_meta_entry__bindgen_ty_3, 6011 } 6012 #[repr(C, packed)] 6013 #[derive(Copy, Clone)] 6014 pub union ndb_note_meta_entry__bindgen_ty_1 { 6015 pub flags: u16, 6016 pub reposts: u16, 6017 } 6018 #[test] 6019 fn bindgen_test_layout_ndb_note_meta_entry__bindgen_ty_1() { 6020 const UNINIT: ::std::mem::MaybeUninit<ndb_note_meta_entry__bindgen_ty_1> = 6021 ::std::mem::MaybeUninit::uninit(); 6022 let ptr = UNINIT.as_ptr(); 6023 assert_eq!( 6024 ::std::mem::size_of::<ndb_note_meta_entry__bindgen_ty_1>(), 6025 2usize, 6026 concat!("Size of: ", stringify!(ndb_note_meta_entry__bindgen_ty_1)) 6027 ); 6028 assert_eq!( 6029 ::std::mem::align_of::<ndb_note_meta_entry__bindgen_ty_1>(), 6030 1usize, 6031 concat!( 6032 "Alignment of ", 6033 stringify!(ndb_note_meta_entry__bindgen_ty_1) 6034 ) 6035 ); 6036 assert_eq!( 6037 unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 6038 0usize, 6039 concat!( 6040 "Offset of field: ", 6041 stringify!(ndb_note_meta_entry__bindgen_ty_1), 6042 "::", 6043 stringify!(flags) 6044 ) 6045 ); 6046 assert_eq!( 6047 unsafe { ::std::ptr::addr_of!((*ptr).reposts) as usize - ptr as usize }, 6048 0usize, 6049 concat!( 6050 "Offset of field: ", 6051 stringify!(ndb_note_meta_entry__bindgen_ty_1), 6052 "::", 6053 stringify!(reposts) 6054 ) 6055 ); 6056 } 6057 #[repr(C, packed)] 6058 #[derive(Copy, Clone)] 6059 pub union ndb_note_meta_entry__bindgen_ty_2 { 6060 pub value: u32, 6061 pub total_reactions: u32, 6062 } 6063 #[test] 6064 fn bindgen_test_layout_ndb_note_meta_entry__bindgen_ty_2() { 6065 const UNINIT: ::std::mem::MaybeUninit<ndb_note_meta_entry__bindgen_ty_2> = 6066 ::std::mem::MaybeUninit::uninit(); 6067 let ptr = UNINIT.as_ptr(); 6068 assert_eq!( 6069 ::std::mem::size_of::<ndb_note_meta_entry__bindgen_ty_2>(), 6070 4usize, 6071 concat!("Size of: ", stringify!(ndb_note_meta_entry__bindgen_ty_2)) 6072 ); 6073 assert_eq!( 6074 ::std::mem::align_of::<ndb_note_meta_entry__bindgen_ty_2>(), 6075 1usize, 6076 concat!( 6077 "Alignment of ", 6078 stringify!(ndb_note_meta_entry__bindgen_ty_2) 6079 ) 6080 ); 6081 assert_eq!( 6082 unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 6083 0usize, 6084 concat!( 6085 "Offset of field: ", 6086 stringify!(ndb_note_meta_entry__bindgen_ty_2), 6087 "::", 6088 stringify!(value) 6089 ) 6090 ); 6091 assert_eq!( 6092 unsafe { ::std::ptr::addr_of!((*ptr).total_reactions) as usize - ptr as usize }, 6093 0usize, 6094 concat!( 6095 "Offset of field: ", 6096 stringify!(ndb_note_meta_entry__bindgen_ty_2), 6097 "::", 6098 stringify!(total_reactions) 6099 ) 6100 ); 6101 } 6102 #[repr(C, packed)] 6103 #[derive(Copy, Clone)] 6104 pub union ndb_note_meta_entry__bindgen_ty_3 { 6105 pub value: u64, 6106 pub offset: ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_1, 6107 pub counts: ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_2, 6108 pub reaction_str: ndb_reaction_str, 6109 } 6110 #[repr(C, packed)] 6111 #[derive(Debug, Copy, Clone)] 6112 pub struct ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_1 { 6113 pub offset: u32, 6114 pub padding: u32, 6115 } 6116 #[test] 6117 fn bindgen_test_layout_ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_1() { 6118 const UNINIT: ::std::mem::MaybeUninit<ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_1> = 6119 ::std::mem::MaybeUninit::uninit(); 6120 let ptr = UNINIT.as_ptr(); 6121 assert_eq!( 6122 ::std::mem::size_of::<ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_1>(), 6123 8usize, 6124 concat!( 6125 "Size of: ", 6126 stringify!(ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_1) 6127 ) 6128 ); 6129 assert_eq!( 6130 ::std::mem::align_of::<ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_1>(), 6131 1usize, 6132 concat!( 6133 "Alignment of ", 6134 stringify!(ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_1) 6135 ) 6136 ); 6137 assert_eq!( 6138 unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 6139 0usize, 6140 concat!( 6141 "Offset of field: ", 6142 stringify!(ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_1), 6143 "::", 6144 stringify!(offset) 6145 ) 6146 ); 6147 assert_eq!( 6148 unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, 6149 4usize, 6150 concat!( 6151 "Offset of field: ", 6152 stringify!(ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_1), 6153 "::", 6154 stringify!(padding) 6155 ) 6156 ); 6157 } 6158 #[repr(C, packed)] 6159 #[derive(Debug, Copy, Clone)] 6160 pub struct ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_2 { 6161 pub direct_replies: u16, 6162 pub quotes: u16, 6163 pub thread_replies: u32, 6164 } 6165 #[test] 6166 fn bindgen_test_layout_ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_2() { 6167 const UNINIT: ::std::mem::MaybeUninit<ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_2> = 6168 ::std::mem::MaybeUninit::uninit(); 6169 let ptr = UNINIT.as_ptr(); 6170 assert_eq!( 6171 ::std::mem::size_of::<ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_2>(), 6172 8usize, 6173 concat!( 6174 "Size of: ", 6175 stringify!(ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_2) 6176 ) 6177 ); 6178 assert_eq!( 6179 ::std::mem::align_of::<ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_2>(), 6180 1usize, 6181 concat!( 6182 "Alignment of ", 6183 stringify!(ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_2) 6184 ) 6185 ); 6186 assert_eq!( 6187 unsafe { ::std::ptr::addr_of!((*ptr).direct_replies) as usize - ptr as usize }, 6188 0usize, 6189 concat!( 6190 "Offset of field: ", 6191 stringify!(ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_2), 6192 "::", 6193 stringify!(direct_replies) 6194 ) 6195 ); 6196 assert_eq!( 6197 unsafe { ::std::ptr::addr_of!((*ptr).quotes) as usize - ptr as usize }, 6198 2usize, 6199 concat!( 6200 "Offset of field: ", 6201 stringify!(ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_2), 6202 "::", 6203 stringify!(quotes) 6204 ) 6205 ); 6206 assert_eq!( 6207 unsafe { ::std::ptr::addr_of!((*ptr).thread_replies) as usize - ptr as usize }, 6208 4usize, 6209 concat!( 6210 "Offset of field: ", 6211 stringify!(ndb_note_meta_entry__bindgen_ty_3__bindgen_ty_2), 6212 "::", 6213 stringify!(thread_replies) 6214 ) 6215 ); 6216 } 6217 #[test] 6218 fn bindgen_test_layout_ndb_note_meta_entry__bindgen_ty_3() { 6219 const UNINIT: ::std::mem::MaybeUninit<ndb_note_meta_entry__bindgen_ty_3> = 6220 ::std::mem::MaybeUninit::uninit(); 6221 let ptr = UNINIT.as_ptr(); 6222 assert_eq!( 6223 ::std::mem::size_of::<ndb_note_meta_entry__bindgen_ty_3>(), 6224 8usize, 6225 concat!("Size of: ", stringify!(ndb_note_meta_entry__bindgen_ty_3)) 6226 ); 6227 assert_eq!( 6228 ::std::mem::align_of::<ndb_note_meta_entry__bindgen_ty_3>(), 6229 1usize, 6230 concat!( 6231 "Alignment of ", 6232 stringify!(ndb_note_meta_entry__bindgen_ty_3) 6233 ) 6234 ); 6235 assert_eq!( 6236 unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 6237 0usize, 6238 concat!( 6239 "Offset of field: ", 6240 stringify!(ndb_note_meta_entry__bindgen_ty_3), 6241 "::", 6242 stringify!(value) 6243 ) 6244 ); 6245 assert_eq!( 6246 unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 6247 0usize, 6248 concat!( 6249 "Offset of field: ", 6250 stringify!(ndb_note_meta_entry__bindgen_ty_3), 6251 "::", 6252 stringify!(offset) 6253 ) 6254 ); 6255 assert_eq!( 6256 unsafe { ::std::ptr::addr_of!((*ptr).counts) as usize - ptr as usize }, 6257 0usize, 6258 concat!( 6259 "Offset of field: ", 6260 stringify!(ndb_note_meta_entry__bindgen_ty_3), 6261 "::", 6262 stringify!(counts) 6263 ) 6264 ); 6265 assert_eq!( 6266 unsafe { ::std::ptr::addr_of!((*ptr).reaction_str) as usize - ptr as usize }, 6267 0usize, 6268 concat!( 6269 "Offset of field: ", 6270 stringify!(ndb_note_meta_entry__bindgen_ty_3), 6271 "::", 6272 stringify!(reaction_str) 6273 ) 6274 ); 6275 } 6276 #[test] 6277 fn bindgen_test_layout_ndb_note_meta_entry() { 6278 const UNINIT: ::std::mem::MaybeUninit<ndb_note_meta_entry> = ::std::mem::MaybeUninit::uninit(); 6279 let ptr = UNINIT.as_ptr(); 6280 assert_eq!( 6281 ::std::mem::size_of::<ndb_note_meta_entry>(), 6282 16usize, 6283 concat!("Size of: ", stringify!(ndb_note_meta_entry)) 6284 ); 6285 assert_eq!( 6286 ::std::mem::align_of::<ndb_note_meta_entry>(), 6287 1usize, 6288 concat!("Alignment of ", stringify!(ndb_note_meta_entry)) 6289 ); 6290 assert_eq!( 6291 unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 6292 0usize, 6293 concat!( 6294 "Offset of field: ", 6295 stringify!(ndb_note_meta_entry), 6296 "::", 6297 stringify!(type_) 6298 ) 6299 ); 6300 assert_eq!( 6301 unsafe { ::std::ptr::addr_of!((*ptr).aux2) as usize - ptr as usize }, 6302 2usize, 6303 concat!( 6304 "Offset of field: ", 6305 stringify!(ndb_note_meta_entry), 6306 "::", 6307 stringify!(aux2) 6308 ) 6309 ); 6310 assert_eq!( 6311 unsafe { ::std::ptr::addr_of!((*ptr).aux) as usize - ptr as usize }, 6312 4usize, 6313 concat!( 6314 "Offset of field: ", 6315 stringify!(ndb_note_meta_entry), 6316 "::", 6317 stringify!(aux) 6318 ) 6319 ); 6320 assert_eq!( 6321 unsafe { ::std::ptr::addr_of!((*ptr).payload) as usize - ptr as usize }, 6322 8usize, 6323 concat!( 6324 "Offset of field: ", 6325 stringify!(ndb_note_meta_entry), 6326 "::", 6327 stringify!(payload) 6328 ) 6329 ); 6330 } 6331 pub type static_assert_note_meta_entry_should_be_16_bytes = [::std::os::raw::c_char; 1usize]; 6332 #[repr(C, packed)] 6333 #[derive(Debug, Copy, Clone)] 6334 pub struct ndb_note_meta { 6335 pub version: u8, 6336 pub padding: u8, 6337 pub count: u16, 6338 pub data_table_size: u32, 6339 pub flags: u64, 6340 } 6341 #[test] 6342 fn bindgen_test_layout_ndb_note_meta() { 6343 const UNINIT: ::std::mem::MaybeUninit<ndb_note_meta> = ::std::mem::MaybeUninit::uninit(); 6344 let ptr = UNINIT.as_ptr(); 6345 assert_eq!( 6346 ::std::mem::size_of::<ndb_note_meta>(), 6347 16usize, 6348 concat!("Size of: ", stringify!(ndb_note_meta)) 6349 ); 6350 assert_eq!( 6351 ::std::mem::align_of::<ndb_note_meta>(), 6352 1usize, 6353 concat!("Alignment of ", stringify!(ndb_note_meta)) 6354 ); 6355 assert_eq!( 6356 unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 6357 0usize, 6358 concat!( 6359 "Offset of field: ", 6360 stringify!(ndb_note_meta), 6361 "::", 6362 stringify!(version) 6363 ) 6364 ); 6365 assert_eq!( 6366 unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, 6367 1usize, 6368 concat!( 6369 "Offset of field: ", 6370 stringify!(ndb_note_meta), 6371 "::", 6372 stringify!(padding) 6373 ) 6374 ); 6375 assert_eq!( 6376 unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 6377 2usize, 6378 concat!( 6379 "Offset of field: ", 6380 stringify!(ndb_note_meta), 6381 "::", 6382 stringify!(count) 6383 ) 6384 ); 6385 assert_eq!( 6386 unsafe { ::std::ptr::addr_of!((*ptr).data_table_size) as usize - ptr as usize }, 6387 4usize, 6388 concat!( 6389 "Offset of field: ", 6390 stringify!(ndb_note_meta), 6391 "::", 6392 stringify!(data_table_size) 6393 ) 6394 ); 6395 assert_eq!( 6396 unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 6397 8usize, 6398 concat!( 6399 "Offset of field: ", 6400 stringify!(ndb_note_meta), 6401 "::", 6402 stringify!(flags) 6403 ) 6404 ); 6405 } 6406 pub type __builtin_va_list = [__va_list_tag; 1usize]; 6407 #[repr(C)] 6408 #[derive(Debug, Copy, Clone)] 6409 pub struct __va_list_tag { 6410 pub gp_offset: ::std::os::raw::c_uint, 6411 pub fp_offset: ::std::os::raw::c_uint, 6412 pub overflow_arg_area: *mut ::std::os::raw::c_void, 6413 pub reg_save_area: *mut ::std::os::raw::c_void, 6414 } 6415 #[test] 6416 fn bindgen_test_layout___va_list_tag() { 6417 const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); 6418 let ptr = UNINIT.as_ptr(); 6419 assert_eq!( 6420 ::std::mem::size_of::<__va_list_tag>(), 6421 24usize, 6422 concat!("Size of: ", stringify!(__va_list_tag)) 6423 ); 6424 assert_eq!( 6425 ::std::mem::align_of::<__va_list_tag>(), 6426 8usize, 6427 concat!("Alignment of ", stringify!(__va_list_tag)) 6428 ); 6429 assert_eq!( 6430 unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, 6431 0usize, 6432 concat!( 6433 "Offset of field: ", 6434 stringify!(__va_list_tag), 6435 "::", 6436 stringify!(gp_offset) 6437 ) 6438 ); 6439 assert_eq!( 6440 unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, 6441 4usize, 6442 concat!( 6443 "Offset of field: ", 6444 stringify!(__va_list_tag), 6445 "::", 6446 stringify!(fp_offset) 6447 ) 6448 ); 6449 assert_eq!( 6450 unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, 6451 8usize, 6452 concat!( 6453 "Offset of field: ", 6454 stringify!(__va_list_tag), 6455 "::", 6456 stringify!(overflow_arg_area) 6457 ) 6458 ); 6459 assert_eq!( 6460 unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, 6461 16usize, 6462 concat!( 6463 "Offset of field: ", 6464 stringify!(__va_list_tag), 6465 "::", 6466 stringify!(reg_save_area) 6467 ) 6468 ); 6469 } 6470 #[repr(C)] 6471 #[derive(Debug, Copy, Clone)] 6472 pub struct __locale_data { 6473 pub _address: u8, 6474 }