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