1
2
3
/* automatically generated by rust-bindgen */

pub const true_ : u32 = 1 ; pub const false_ : u32 = 0 ; pub const __bool_true_false_are_defined : u32 = 1 ; pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; pub const __GLIBC_USE_ISOC2X : u32 = 0 ; pub const __USE_ISOC11 : u32 = 1 ; pub const __USE_ISOC99 : u32 = 1 ; pub const __USE_ISOC95 : u32 = 1 ; pub const __USE_POSIX_IMPLICITLY : u32 = 1 ; pub const _POSIX_SOURCE : u32 = 1 ; pub const _POSIX_C_SOURCE : u32 = 200809 ; pub const __USE_POSIX : u32 = 1 ; pub const __USE_POSIX2 : u32 = 1 ; pub const __USE_POSIX199309 : u32 = 1 ; pub const __USE_POSIX199506 : u32 = 1 ; pub const __USE_XOPEN2K : u32 = 1 ; pub const __USE_XOPEN2K8 : u32 = 1 ; pub const _ATFILE_SOURCE : u32 = 1 ; pub const __USE_MISC : u32 = 1 ; pub const __USE_ATFILE : u32 = 1 ; pub const __USE_FORTIFY_LEVEL : u32 = 0 ; pub const __GLIBC_USE_DEPRECATED_GETS : u32 = 0 ; pub const __GLIBC_USE_DEPRECATED_SCANF : u32 = 0 ; pub const _STDC_PREDEF_H : u32 = 1 ; pub const __STDC_IEC_559__ : u32 = 1 ; pub const __STDC_IEC_559_COMPLEX__ : u32 = 1 ; pub const __STDC_ISO_10646__ : u32 = 201706 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 31 ; pub const _SYS_CDEFS_H : u32 = 1 ; pub const __glibc_c99_flexarr_available : u32 = 1 ; pub const __WORDSIZE : u32 = 64 ; pub const __WORDSIZE_TIME64_COMPAT32 : u32 = 1 ; pub const __SYSCALL_WORDSIZE : u32 = 64 ; pub const __LONG_DOUBLE_USES_FLOAT128 : u32 = 0 ; pub const __HAVE_GENERIC_SELECTION : u32 = 1 ; pub const __GLIBC_USE_LIB_EXT2 : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_BFP_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; pub const __TIMESIZE : u32 = 64 ; pub const _BITS_TYPESIZES_H : u32 = 1 ; pub const __OFF_T_MATCHES_OFF64_T : u32 = 1 ; pub const __INO_T_MATCHES_INO64_T : u32 = 1 ; pub const __RLIM_T_MATCHES_RLIM64_T : u32 = 1 ; pub const __STATFS_MATCHES_STATFS64 : u32 = 1 ; pub const __FD_SETSIZE : u32 = 1024 ; pub const _BITS_TIME64_H : u32 = 1 ; pub const _BITS_WCHAR_H : u32 = 1 ; pub const _BITS_STDINT_INTN_H : u32 = 1 ; pub const _BITS_STDINT_UINTN_H : u32 = 1 ; pub const INT8_MIN : i32 = -128 ; pub const INT16_MIN : i32 = -32768 ; pub const INT32_MIN : i32 = -2147483648 ; pub const INT8_MAX : u32 = 127 ; pub const INT16_MAX : u32 = 32767 ; pub const INT32_MAX : u32 = 2147483647 ; pub const UINT8_MAX : u32 = 255 ; pub const UINT16_MAX : u32 = 65535 ; pub const UINT32_MAX : u32 = 4294967295 ; pub const INT_LEAST8_MIN : i32 = -128 ; pub const INT_LEAST16_MIN : i32 = -32768 ; pub const INT_LEAST32_MIN : i32 = -2147483648 ; pub const INT_LEAST8_MAX : u32 = 127 ; pub const INT_LEAST16_MAX : u32 = 32767 ; pub const INT_LEAST32_MAX : u32 = 2147483647 ; pub const UINT_LEAST8_MAX : u32 = 255 ; pub const UINT_LEAST16_MAX : u32 = 65535 ; pub const UINT_LEAST32_MAX : u32 = 4294967295 ; pub const INT_FAST8_MIN : i32 = -128 ; pub const INT_FAST16_MIN : i64 = -9223372036854775808 ; pub const INT_FAST32_MIN : i64 = -9223372036854775808 ; pub const INT_FAST8_MAX : u32 = 127 ; pub const INT_FAST16_MAX : u64 = 9223372036854775807 ; pub const INT_FAST32_MAX : u64 = 9223372036854775807 ; pub const UINT_FAST8_MAX : u32 = 255 ; pub const UINT_FAST16_MAX : i32 = -1 ; pub const UINT_FAST32_MAX : i32 = -1 ; pub const INTPTR_MIN : i64 = -9223372036854775808 ; pub const INTPTR_MAX : u64 = 9223372036854775807 ; pub const UINTPTR_MAX : i32 = -1 ; pub const PTRDIFF_MIN : i64 = -9223372036854775808 ; pub const PTRDIFF_MAX : u64 = 9223372036854775807 ; pub const SIG_ATOMIC_MIN : i32 = -2147483648 ; pub const SIG_ATOMIC_MAX : u32 = 2147483647 ; pub const SIZE_MAX : i32 = -1 ; pub const WINT_MIN : u32 = 0 ; pub const WINT_MAX : u32 = 4294967295 ; pub const _STDIO_H : u32 = 1 ; pub const __GNUC_VA_LIST : u32 = 1 ; pub const _____fpos_t_defined : u32 = 1 ; pub const ____mbstate_t_defined : u32 = 1 ; pub const _____fpos64_t_defined : u32 = 1 ; pub const ____FILE_defined : u32 = 1 ; pub const __FILE_defined : u32 = 1 ; pub const __struct_FILE_defined : u32 = 1 ; pub const _IO_EOF_SEEN : u32 = 16 ; pub const _IO_ERR_SEEN : u32 = 32 ; pub const _IO_USER_LOCK : u32 = 32768 ; pub const _IOFBF : u32 = 0 ; pub const _IOLBF : u32 = 1 ; pub const _IONBF : u32 = 2 ; pub const BUFSIZ : u32 = 8192 ; pub const EOF : i32 = -1 ; pub const SEEK_SET : u32 = 0 ; pub const SEEK_CUR : u32 = 1 ; pub const SEEK_END : u32 = 2 ; pub const P_tmpdir : & 'static [ u8 ; 5usize ] = b"/tmp\0" ; pub const _BITS_STDIO_LIM_H : u32 = 1 ; pub const L_tmpnam : u32 = 20 ; pub const TMP_MAX : u32 = 238328 ; pub const FILENAME_MAX : u32 = 4096 ; pub const L_ctermid : u32 = 9 ; pub const FOPEN_MAX : u32 = 16 ; pub const _STDLIB_H : u32 = 1 ; pub const WNOHANG : u32 = 1 ; pub const WUNTRACED : u32 = 2 ; pub const WSTOPPED : u32 = 2 ; pub const WEXITED : u32 = 4 ; pub const WCONTINUED : u32 = 8 ; pub const WNOWAIT : u32 = 16777216 ; pub const __WNOTHREAD : u32 = 536870912 ; pub const __WALL : u32 = 1073741824 ; pub const __WCLONE : u32 = 2147483648 ; pub const __ENUM_IDTYPE_T : u32 = 1 ; pub const __W_CONTINUED : u32 = 65535 ; pub const __WCOREFLAG : u32 = 128 ; pub const __HAVE_FLOAT128 : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT128 : u32 = 0 ; pub const __HAVE_FLOAT64X : u32 = 1 ; pub const __HAVE_FLOAT64X_LONG_DOUBLE : u32 = 1 ; pub const __HAVE_FLOAT16 : u32 = 0 ; pub const __HAVE_FLOAT32 : u32 = 1 ; pub const __HAVE_FLOAT64 : u32 = 1 ; pub const __HAVE_FLOAT32X : u32 = 1 ; pub const __HAVE_FLOAT128X : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT16 : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT32 : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT64 : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT32X : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT64X : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT128X : u32 = 0 ; pub const __HAVE_FLOATN_NOT_TYPEDEF : u32 = 0 ; pub const __ldiv_t_defined : u32 = 1 ; pub const __lldiv_t_defined : u32 = 1 ; pub const RAND_MAX : u32 = 2147483647 ; pub const EXIT_FAILURE : u32 = 1 ; pub const EXIT_SUCCESS : u32 = 0 ; pub const _SYS_TYPES_H : u32 = 1 ; pub const __clock_t_defined : u32 = 1 ; pub const __clockid_t_defined : u32 = 1 ; pub const __time_t_defined : u32 = 1 ; pub const __timer_t_defined : u32 = 1 ; pub const __BIT_TYPES_DEFINED__ : u32 = 1 ; pub const _ENDIAN_H : u32 = 1 ; pub const _BITS_ENDIAN_H : u32 = 1 ; pub const __LITTLE_ENDIAN : u32 = 1234 ; pub const __BIG_ENDIAN : u32 = 4321 ; pub const __PDP_ENDIAN : u32 = 3412 ; pub const _BITS_ENDIANNESS_H : u32 = 1 ; pub const __BYTE_ORDER : u32 = 1234 ; pub const __FLOAT_WORD_ORDER : u32 = 1234 ; pub const LITTLE_ENDIAN : u32 = 1234 ; pub const BIG_ENDIAN : u32 = 4321 ; pub const PDP_ENDIAN : u32 = 3412 ; pub const BYTE_ORDER : u32 = 1234 ; pub const _BITS_BYTESWAP_H : u32 = 1 ; pub const _BITS_UINTN_IDENTITY_H : u32 = 1 ; pub const _SYS_SELECT_H : u32 = 1 ; pub const __FD_ZERO_STOS : & 'static [ u8 ; 6usize ] = b"stosq\0" ; pub const __sigset_t_defined : u32 = 1 ; pub const __timeval_defined : u32 = 1 ; pub const _STRUCT_TIMESPEC : u32 = 1 ; pub const FD_SETSIZE : u32 = 1024 ; pub const _BITS_PTHREADTYPES_COMMON_H : u32 = 1 ; pub const _THREAD_SHARED_TYPES_H : u32 = 1 ; pub const _BITS_PTHREADTYPES_ARCH_H : u32 = 1 ; pub const __SIZEOF_PTHREAD_MUTEX_T : u32 = 40 ; pub const __SIZEOF_PTHREAD_ATTR_T : u32 = 56 ; pub const __SIZEOF_PTHREAD_RWLOCK_T : u32 = 56 ; pub const __SIZEOF_PTHREAD_BARRIER_T : u32 = 32 ; pub const __SIZEOF_PTHREAD_MUTEXATTR_T : u32 = 4 ; pub const __SIZEOF_PTHREAD_COND_T : u32 = 48 ; pub const __SIZEOF_PTHREAD_CONDATTR_T : u32 = 4 ; pub const __SIZEOF_PTHREAD_RWLOCKATTR_T : u32 = 8 ; pub const __SIZEOF_PTHREAD_BARRIERATTR_T : u32 = 4 ; pub const _THREAD_MUTEX_INTERNAL_H : u32 = 1 ; pub const __PTHREAD_MUTEX_HAVE_PREV : u32 = 1 ; pub const __have_pthread_attr_t : u32 = 1 ; pub const _ALLOCA_H : u32 = 1 ; pub const _STRING_H : u32 = 1 ; pub const _BITS_TYPES_LOCALE_T_H : u32 = 1 ; pub const _BITS_TYPES___LOCALE_T_H : u32 = 1 ; pub const _STRINGS_H : u32 = 1 ; pub const DATA_DEPTH_MAX : u32 = 11 ; pub const _TIME_H : u32 = 1 ; pub const _BITS_TIME_H : u32 = 1 ; pub const CLOCK_REALTIME : u32 = 0 ; pub const CLOCK_MONOTONIC : u32 = 1 ; pub const CLOCK_PROCESS_CPUTIME_ID : u32 = 2 ; pub const CLOCK_THREAD_CPUTIME_ID : u32 = 3 ; pub const CLOCK_MONOTONIC_RAW : u32 = 4 ; pub const CLOCK_REALTIME_COARSE : u32 = 5 ; pub const CLOCK_MONOTONIC_COARSE : u32 = 6 ; pub const CLOCK_BOOTTIME : u32 = 7 ; pub const CLOCK_REALTIME_ALARM : u32 = 8 ; pub const CLOCK_BOOTTIME_ALARM : u32 = 9 ; pub const CLOCK_TAI : u32 = 11 ; pub const TIMER_ABSTIME : u32 = 1 ; pub const __struct_tm_defined : u32 = 1 ; pub const __itimerspec_defined : u32 = 1 ; pub const TIME_UTC : u32 = 1 ; pub const IN3_PROTO_VER : & 'static [ u8 ; 6usize ] = b"2.1.0\0" ; pub const ETH_CHAIN_ID_MULTICHAIN : u32 = 0 ; pub const ETH_CHAIN_ID_MAINNET : u32 = 1 ; pub const ETH_CHAIN_ID_KOVAN : u32 = 42 ; pub const ETH_CHAIN_ID_TOBALABA : u32 = 1101 ; pub const ETH_CHAIN_ID_GOERLI : u32 = 5 ; pub const ETH_CHAIN_ID_EVAN : u32 = 1201 ; pub const ETH_CHAIN_ID_IPFS : u32 = 2000 ; pub const ETH_CHAIN_ID_BTC : u32 = 153 ; pub const ETH_CHAIN_ID_LOCAL : u32 = 65535 ; pub const DEF_REPL_LATEST_BLK : u32 = 6 ; pub const IN3_SIGN_ERR_REJECTED : i32 = -1 ; pub const IN3_SIGN_ERR_ACCOUNT_NOT_FOUND : i32 = -2 ; pub const IN3_SIGN_ERR_INVALID_MESSAGE : i32 = -3 ; pub const IN3_SIGN_ERR_GENERAL_ERROR : i32 = -4 ; pub const USE_PRECOMPUTED_CP : u32 = 1 ; pub const USE_INVERSE_FAST : u32 = 1 ; pub const USE_BN_PRINT : u32 = 0 ; pub const USE_RFC6979 : u32 = 1 ; pub const USE_BIP32_CACHE : u32 = 1 ; pub const BIP32_CACHE_SIZE : u32 = 10 ; pub const BIP32_CACHE_MAXDEPTH : u32 = 8 ; pub const USE_BIP32_25519_CURVES : u32 = 1 ; pub const USE_BIP39_CACHE : u32 = 1 ; pub const BIP39_CACHE_SIZE : u32 = 4 ; pub const USE_ETHEREUM : u32 = 0 ; pub const USE_GRAPHENE : u32 = 0 ; pub const USE_NEM : u32 = 0 ; pub const USE_MONERO : u32 = 0 ; pub const USE_CARDANO : u32 = 0 ; pub const USE_KECCAK : u32 = 1 ; pub const SHA1_BLOCK_LENGTH : u32 = 64 ; pub const SHA1_DIGEST_LENGTH : u32 = 20 ; pub const SHA1_DIGEST_STRING_LENGTH : u32 = 41 ; pub const SHA256_BLOCK_LENGTH : u32 = 64 ; pub const SHA256_DIGEST_LENGTH : u32 = 32 ; pub const SHA256_DIGEST_STRING_LENGTH : u32 = 65 ; pub const SHA512_BLOCK_LENGTH : u32 = 128 ; pub const SHA512_DIGEST_LENGTH : u32 = 64 ; pub const SHA512_DIGEST_STRING_LENGTH : u32 = 129 ; pub const sha3_224_hash_size : u32 = 28 ; pub const sha3_256_hash_size : u32 = 32 ; pub const sha3_384_hash_size : u32 = 48 ; pub const sha3_512_hash_size : u32 = 64 ; pub const sha3_max_permutation_size : u32 = 25 ; pub const sha3_max_rate_in_qwords : u32 = 24 ; pub const SHA3_224_BLOCK_LENGTH : u32 = 144 ; pub const SHA3_256_BLOCK_LENGTH : u32 = 136 ; pub const SHA3_384_BLOCK_LENGTH : u32 = 104 ; pub const SHA3_512_BLOCK_LENGTH : u32 = 72 ; pub const SHA3_224_DIGEST_LENGTH : u32 = 28 ; pub const SHA3_256_DIGEST_LENGTH : u32 = 32 ; pub const SHA3_384_DIGEST_LENGTH : u32 = 48 ; pub const SHA3_512_DIGEST_LENGTH : u32 = 64 ; pub const BLAKE256_DIGEST_LENGTH : u32 = 32 ; pub const BLAKE256_BLOCK_LENGTH : u32 = 64 ; pub const HASHER_DIGEST_LENGTH : u32 = 32 ; pub const MAX_ADDR_RAW_SIZE : u32 = 65 ; pub const MAX_ADDR_SIZE : u32 = 130 ; pub const MAX_WIF_RAW_SIZE : u32 = 37 ; pub const MAX_WIF_SIZE : u32 = 57 ; pub type __u_char = libc :: c_uchar ; pub type __u_short = libc :: c_ushort ; pub type __u_int = libc :: c_uint ; pub type __u_long = libc :: c_ulong ; pub type __int8_t = libc :: c_schar ; pub type __uint8_t = libc :: c_uchar ; pub type __int16_t = libc :: c_short ; pub type __uint16_t = libc :: c_ushort ; pub type __int32_t = libc :: c_int ; pub type __uint32_t = libc :: c_uint ; pub type __int64_t = libc :: c_long ; pub type __uint64_t = libc :: c_ulong ; pub type __int_least8_t = __int8_t ; pub type __uint_least8_t = __uint8_t ; pub type __int_least16_t = __int16_t ; pub type __uint_least16_t = __uint16_t ; pub type __int_least32_t = __int32_t ; pub type __uint_least32_t = __uint32_t ; pub type __int_least64_t = __int64_t ; pub type __uint_least64_t = __uint64_t ; pub type __quad_t = libc :: c_long ; pub type __u_quad_t = libc :: c_ulong ; pub type __intmax_t = libc :: c_long ; pub type __uintmax_t = libc :: c_ulong ; pub type __dev_t = libc :: c_ulong ; pub type __uid_t = libc :: c_uint ; pub type __gid_t = libc :: c_uint ; pub type __ino_t = libc :: c_ulong ; pub type __ino64_t = libc :: c_ulong ; pub type __mode_t = libc :: c_uint ; pub type __nlink_t = libc :: c_ulong ; pub type __off_t = libc :: c_long ; pub type __off64_t = libc :: c_long ; pub type __pid_t = libc :: c_int ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __fsid_t { pub __val : [ libc :: c_int ; 2usize ] , } # [ test ] fn bindgen_test_layout___fsid_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __fsid_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __fsid_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __fsid_t > ( ) ) ) . __val as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __fsid_t ) , "::" , stringify ! ( __val ) ) ) ; } pub type __clock_t = libc :: c_long ; pub type __rlim_t = libc :: c_ulong ; pub type __rlim64_t = libc :: c_ulong ; pub type __id_t = libc :: c_uint ; pub type __time_t = libc :: c_long ; pub type __useconds_t = libc :: c_uint ; pub type __suseconds_t = libc :: c_long ; pub type __daddr_t = libc :: c_int ; pub type __key_t = libc :: c_int ; pub type __clockid_t = libc :: c_int ; pub type __timer_t = * mut libc :: c_void ; pub type __blksize_t = libc :: c_long ; pub type __blkcnt_t = libc :: c_long ; pub type __blkcnt64_t = libc :: c_long ; pub type __fsblkcnt_t = libc :: c_ulong ; pub type __fsblkcnt64_t = libc :: c_ulong ; pub type __fsfilcnt_t = libc :: c_ulong ; pub type __fsfilcnt64_t = libc :: c_ulong ; pub type __fsword_t = libc :: c_long ; pub type __ssize_t = libc :: c_long ; pub type __syscall_slong_t = libc :: c_long ; pub type __syscall_ulong_t = libc :: c_ulong ; pub type __loff_t = __off64_t ; pub type __caddr_t = * mut libc :: c_char ; pub type __intptr_t = libc :: c_long ; pub type __socklen_t = libc :: c_uint ; pub type __sig_atomic_t = libc :: c_int ; pub type int_least8_t = __int_least8_t ; pub type int_least16_t = __int_least16_t ; pub type int_least32_t = __int_least32_t ; pub type int_least64_t = __int_least64_t ; pub type uint_least8_t = __uint_least8_t ; pub type uint_least16_t = __uint_least16_t ; pub type uint_least32_t = __uint_least32_t ; pub type uint_least64_t = __uint_least64_t ; pub type int_fast8_t = libc :: c_schar ; pub type int_fast16_t = libc :: c_long ; pub type int_fast32_t = libc :: c_long ; pub type int_fast64_t = libc :: c_long ; pub type uint_fast8_t = libc :: c_uchar ; pub type uint_fast16_t = libc :: c_ulong ; pub type uint_fast32_t = libc :: c_ulong ; pub type uint_fast64_t = libc :: c_ulong ; pub type intmax_t = __intmax_t ; pub type uintmax_t = __uintmax_t ; pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin_va_list ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct __mbstate_t { pub __count : libc :: c_int , pub __value : __mbstate_t__bindgen_ty_1 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union __mbstate_t__bindgen_ty_1 { pub __wch : libc :: c_uint , pub __wchb : [ libc :: c_char ; 4usize ] , _bindgen_union_align : u32 , } # [ test ] fn bindgen_test_layout___mbstate_t__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __mbstate_t__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( __mbstate_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __mbstate_t__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( __mbstate_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __mbstate_t__bindgen_ty_1 > ( ) ) ) . __wch as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __mbstate_t__bindgen_ty_1 ) , "::" , stringify ! ( __wch ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __mbstate_t__bindgen_ty_1 > ( ) ) ) . __wchb as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __mbstate_t__bindgen_ty_1 ) , "::" , stringify ! ( __wchb ) ) ) ; } impl :: core :: fmt :: Debug for __mbstate_t__bindgen_ty_1 { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "__mbstate_t__bindgen_ty_1 {{ union }}" ) } } # [ test ] fn bindgen_test_layout___mbstate_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __mbstate_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __mbstate_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __mbstate_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( __mbstate_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __mbstate_t > ( ) ) ) . __count as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __mbstate_t ) , "::" , stringify ! ( __count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __mbstate_t > ( ) ) ) . __value as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( __mbstate_t ) , "::" , stringify ! ( __value ) ) ) ; } impl :: core :: fmt :: Debug for __mbstate_t { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "__mbstate_t {{ __count: {:?}, __value: {:?} }}" , self . __count , self . __value ) } } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct _G_fpos_t { pub __pos : __off_t , pub __state : __mbstate_t , } # [ test ] fn bindgen_test_layout__G_fpos_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < _G_fpos_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( _G_fpos_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < _G_fpos_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( _G_fpos_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _G_fpos_t > ( ) ) ) . __pos as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _G_fpos_t ) , "::" , stringify ! ( __pos ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _G_fpos_t > ( ) ) ) . __state as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( _G_fpos_t ) , "::" , stringify ! ( __state ) ) ) ; } impl :: core :: fmt :: Debug for _G_fpos_t { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "_G_fpos_t {{ __pos: {:?}, __state: {:?} }}" , self . __pos , self . __state ) } } pub type __fpos_t = _G_fpos_t ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct _G_fpos64_t { pub __pos : __off64_t , pub __state : __mbstate_t , } # [ test ] fn bindgen_test_layout__G_fpos64_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < _G_fpos64_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( _G_fpos64_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < _G_fpos64_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( _G_fpos64_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _G_fpos64_t > ( ) ) ) . __pos as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _G_fpos64_t ) , "::" , stringify ! ( __pos ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _G_fpos64_t > ( ) ) ) . __state as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( _G_fpos64_t ) , "::" , stringify ! ( __state ) ) ) ; } impl :: core :: fmt :: Debug for _G_fpos64_t { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "_G_fpos64_t {{ __pos: {:?}, __state: {:?} }}" , self . __pos , self . __state ) } } pub type __fpos64_t = _G_fpos64_t ; pub type __FILE = _IO_FILE ; pub type FILE = _IO_FILE ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct _IO_marker { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct _IO_codecvt { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct _IO_wide_data { _unused : [ u8 ; 0 ] , } pub type _IO_lock_t = libc :: c_void ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct _IO_FILE { pub _flags : libc :: c_int , pub _IO_read_ptr : * mut libc :: c_char , pub _IO_read_end : * mut libc :: c_char , pub _IO_read_base : * mut libc :: c_char , pub _IO_write_base : * mut libc :: c_char , pub _IO_write_ptr : * mut libc :: c_char , pub _IO_write_end : * mut libc :: c_char , pub _IO_buf_base : * mut libc :: c_char , pub _IO_buf_end : * mut libc :: c_char , pub _IO_save_base : * mut libc :: c_char , pub _IO_backup_base : * mut libc :: c_char , pub _IO_save_end : * mut libc :: c_char , pub _markers : * mut _IO_marker , pub _chain : * mut _IO_FILE , pub _fileno : libc :: c_int , pub _flags2 : libc :: c_int , pub _old_offset : __off_t , pub _cur_column : libc :: c_ushort , pub _vtable_offset : libc :: c_schar , pub _shortbuf : [ libc :: c_char ; 1usize ] , pub _lock : * mut _IO_lock_t , pub _offset : __off64_t , pub _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut libc :: c_void , pub __pad5 : usize , pub _mode : libc :: c_int , pub _unused2 : [ libc :: c_char ; 20usize ] , } # [ test ] fn bindgen_test_layout__IO_FILE ( ) { assert_eq ! ( :: core :: mem :: size_of :: < _IO_FILE > ( ) , 216usize , concat ! ( "Size of: " , stringify ! ( _IO_FILE ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < _IO_FILE > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( _IO_FILE ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _flags as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_read_ptr as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_read_ptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_read_end as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_read_end ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_read_base as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_read_base ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_write_base as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_write_base ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_write_ptr as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_write_ptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_write_end as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_write_end ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_buf_base as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_buf_base ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_buf_end as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_buf_end ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_save_base as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_save_base ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_backup_base as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_backup_base ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_save_end as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_save_end ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _markers as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _markers ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _chain as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _chain ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _fileno as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _fileno ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _flags2 as * const _ as usize } , 116usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _flags2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _old_offset as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _old_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _cur_column as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _cur_column ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _vtable_offset as * const _ as usize } , 130usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _vtable_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _shortbuf as * const _ as usize } , 131usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _shortbuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _lock as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _lock ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _offset as * const _ as usize } , 144usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _codecvt as * const _ as usize } , 152usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _codecvt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _wide_data as * const _ as usize } , 160usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _wide_data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _freeres_list as * const _ as usize } , 168usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _freeres_list ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _freeres_buf as * const _ as usize } , 176usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _freeres_buf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . __pad5 as * const _ as usize } , 184usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( __pad5 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _mode as * const _ as usize } , 192usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _mode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _IO_FILE > ( ) ) ) . _unused2 as * const _ as usize } , 196usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _unused2 ) ) ) ; } pub type off_t = __off_t ; pub type fpos_t = __fpos_t ; extern "C" { pub static mut stdin : * mut FILE ; } extern "C" { pub static mut stdout : * mut FILE ; } extern "C" { pub static mut stderr : * mut FILE ; } extern "C" { pub fn remove ( __filename : * const libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn rename ( __old : * const libc :: c_char , __new : * const libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn renameat ( __oldfd : libc :: c_int , __old : * const libc :: c_char , __newfd : libc :: c_int , __new : * const libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn tmpfile ( ) -> * mut FILE ; } extern "C" { pub fn tmpnam ( __s : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn tmpnam_r ( __s : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn tempnam ( __dir : * const libc :: c_char , __pfx : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn fclose ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn fflush ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn fflush_unlocked ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn fopen ( __filename : * const libc :: c_char , __modes : * const libc :: c_char ) -> * mut FILE ; } extern "C" { pub fn freopen ( __filename : * const libc :: c_char , __modes : * const libc :: c_char , __stream : * mut FILE ) -> * mut FILE ; } extern "C" { pub fn fdopen ( __fd : libc :: c_int , __modes : * const libc :: c_char ) -> * mut FILE ; } extern "C" { pub fn fmemopen ( __s : * mut libc :: c_void , __len : usize , __modes : * const libc :: c_char ) -> * mut FILE ; } extern "C" { pub fn open_memstream ( __bufloc : * mut * mut libc :: c_char , __sizeloc : * mut usize ) -> * mut FILE ; } extern "C" { pub fn setbuf ( __stream : * mut FILE , __buf : * mut libc :: c_char ) ; } extern "C" { pub fn setvbuf ( __stream : * mut FILE , __buf : * mut libc :: c_char , __modes : libc :: c_int , __n : usize ) -> libc :: c_int ; } extern "C" { pub fn setbuffer ( __stream : * mut FILE , __buf : * mut libc :: c_char , __size : usize ) ; } extern "C" { pub fn setlinebuf ( __stream : * mut FILE ) ; } extern "C" { pub fn fprintf ( __stream : * mut FILE , __format : * const libc :: c_char , ... ) -> libc :: c_int ; } extern "C" { pub fn printf ( __format : * const libc :: c_char , ... ) -> libc :: c_int ; } extern "C" { pub fn sprintf ( __s : * mut libc :: c_char , __format : * const libc :: c_char , ... ) -> libc :: c_int ; } extern "C" { pub fn vfprintf ( __s : * mut FILE , __format : * const libc :: c_char , __arg : * mut __va_list_tag ) -> libc :: c_int ; } extern "C" { pub fn vprintf ( __format : * const libc :: c_char , __arg : * mut __va_list_tag ) -> libc :: c_int ; } extern "C" { pub fn vsprintf ( __s : * mut libc :: c_char , __format : * const libc :: c_char , __arg : * mut __va_list_tag ) -> libc :: c_int ; } extern "C" { pub fn snprintf ( __s : * mut libc :: c_char , __maxlen : libc :: c_ulong , __format : * const libc :: c_char , ... ) -> libc :: c_int ; } extern "C" { pub fn vsnprintf ( __s : * mut libc :: c_char , __maxlen : libc :: c_ulong , __format : * const libc :: c_char , __arg : * mut __va_list_tag ) -> libc :: c_int ; } extern "C" { pub fn vdprintf ( __fd : libc :: c_int , __fmt : * const libc :: c_char , __arg : * mut __va_list_tag ) -> libc :: c_int ; } extern "C" { pub fn dprintf ( __fd : libc :: c_int , __fmt : * const libc :: c_char , ... ) -> libc :: c_int ; } extern "C" { pub fn fscanf ( __stream : * mut FILE , __format : * const libc :: c_char , ... ) -> libc :: c_int ; } extern "C" { pub fn scanf ( __format : * const libc :: c_char , ... ) -> libc :: c_int ; } extern "C" { pub fn sscanf ( __s : * const libc :: c_char , __format : * const libc :: c_char , ... ) -> libc :: c_int ; } extern "C" { # [ link_name = "\u{1}__isoc99_fscanf" ] pub fn fscanf1 ( __stream : * mut FILE , __format : * const libc :: c_char , ... ) -> libc :: c_int ; } extern "C" { # [ link_name = "\u{1}__isoc99_scanf" ] pub fn scanf1 ( __format : * const libc :: c_char , ... ) -> libc :: c_int ; } extern "C" { # [ link_name = "\u{1}__isoc99_sscanf" ] pub fn sscanf1 ( __s : * const libc :: c_char , __format : * const libc :: c_char , ... ) -> libc :: c_int ; } extern "C" { pub fn vfscanf ( __s : * mut FILE , __format : * const libc :: c_char , __arg : * mut __va_list_tag ) -> libc :: c_int ; } extern "C" { pub fn vscanf ( __format : * const libc :: c_char , __arg : * mut __va_list_tag ) -> libc :: c_int ; } extern "C" { pub fn vsscanf ( __s : * const libc :: c_char , __format : * const libc :: c_char , __arg : * mut __va_list_tag ) -> libc :: c_int ; } extern "C" { # [ link_name = "\u{1}__isoc99_vfscanf" ] pub fn vfscanf1 ( __s : * mut FILE , __format : * const libc :: c_char , __arg : * mut __va_list_tag ) -> libc :: c_int ; } extern "C" { # [ link_name = "\u{1}__isoc99_vscanf" ] pub fn vscanf1 ( __format : * const libc :: c_char , __arg : * mut __va_list_tag ) -> libc :: c_int ; } extern "C" { # [ link_name = "\u{1}__isoc99_vsscanf" ] pub fn vsscanf1 ( __s : * const libc :: c_char , __format : * const libc :: c_char , __arg : * mut __va_list_tag ) -> libc :: c_int ; } extern "C" { pub fn fgetc ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn getc ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn getchar ( ) -> libc :: c_int ; } extern "C" { pub fn getc_unlocked ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn getchar_unlocked ( ) -> libc :: c_int ; } extern "C" { pub fn fgetc_unlocked ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn fputc ( __c : libc :: c_int , __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn putc ( __c : libc :: c_int , __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn putchar ( __c : libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn fputc_unlocked ( __c : libc :: c_int , __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn putc_unlocked ( __c : libc :: c_int , __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn putchar_unlocked ( __c : libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn getw ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn putw ( __w : libc :: c_int , __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn fgets ( __s : * mut libc :: c_char , __n : libc :: c_int , __stream : * mut FILE ) -> * mut libc :: c_char ; } extern "C" { pub fn __getdelim ( __lineptr : * mut * mut libc :: c_char , __n : * mut usize , __delimiter : libc :: c_int , __stream : * mut FILE ) -> __ssize_t ; } extern "C" { pub fn getdelim ( __lineptr : * mut * mut libc :: c_char , __n : * mut usize , __delimiter : libc :: c_int , __stream : * mut FILE ) -> __ssize_t ; } extern "C" { pub fn getline ( __lineptr : * mut * mut libc :: c_char , __n : * mut usize , __stream : * mut FILE ) -> __ssize_t ; } extern "C" { pub fn fputs ( __s : * const libc :: c_char , __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn puts ( __s : * const libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn ungetc ( __c : libc :: c_int , __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn fread ( __ptr : * mut libc :: c_void , __size : libc :: c_ulong , __n : libc :: c_ulong , __stream : * mut FILE ) -> libc :: c_ulong ; } extern "C" { pub fn fwrite ( __ptr : * const libc :: c_void , __size : libc :: c_ulong , __n : libc :: c_ulong , __s : * mut FILE ) -> libc :: c_ulong ; } extern "C" { pub fn fread_unlocked ( __ptr : * mut libc :: c_void , __size : usize , __n : usize , __stream : * mut FILE ) -> usize ; } extern "C" { pub fn fwrite_unlocked ( __ptr : * const libc :: c_void , __size : usize , __n : usize , __stream : * mut FILE ) -> usize ; } extern "C" { pub fn fseek ( __stream : * mut FILE , __off : libc :: c_long , __whence : libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn ftell ( __stream : * mut FILE ) -> libc :: c_long ; } extern "C" { pub fn rewind ( __stream : * mut FILE ) ; } extern "C" { pub fn fseeko ( __stream : * mut FILE , __off : __off_t , __whence : libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn ftello ( __stream : * mut FILE ) -> __off_t ; } extern "C" { pub fn fgetpos ( __stream : * mut FILE , __pos : * mut fpos_t ) -> libc :: c_int ; } extern "C" { pub fn fsetpos ( __stream : * mut FILE , __pos : * const fpos_t ) -> libc :: c_int ; } extern "C" { pub fn clearerr ( __stream : * mut FILE ) ; } extern "C" { pub fn feof ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn ferror ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn clearerr_unlocked ( __stream : * mut FILE ) ; } extern "C" { pub fn feof_unlocked ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn ferror_unlocked ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn perror ( __s : * const libc :: c_char ) ; } extern "C" { pub static mut sys_nerr : libc :: c_int ; } extern "C" { pub static mut sys_errlist : [ * const libc :: c_char ; 0usize ] ; } extern "C" { pub fn fileno ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn fileno_unlocked ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn popen ( __command : * const libc :: c_char , __modes : * const libc :: c_char ) -> * mut FILE ; } extern "C" { pub fn pclose ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn ctermid ( __s : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn flockfile ( __stream : * mut FILE ) ; } extern "C" { pub fn ftrylockfile ( __stream : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn funlockfile ( __stream : * mut FILE ) ; } extern "C" { pub fn __uflow ( arg1 : * mut FILE ) -> libc :: c_int ; } extern "C" { pub fn __overflow ( arg1 : * mut FILE , arg2 : libc :: c_int ) -> libc :: c_int ; } pub type wchar_t = libc :: c_int ; # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum idtype_t { P_ALL = 0 , P_PID = 1 , P_PGID = 2 , } pub type _Float32 = f32 ; pub type _Float64 = f64 ; pub type _Float32x = f64 ; pub type _Float64x = u128 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct div_t { pub quot : libc :: c_int , pub rem : libc :: c_int , } # [ test ] fn bindgen_test_layout_div_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < div_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( div_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < div_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( div_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < div_t > ( ) ) ) . quot as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( div_t ) , "::" , stringify ! ( quot ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < div_t > ( ) ) ) . rem as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( div_t ) , "::" , stringify ! ( rem ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ldiv_t { pub quot : libc :: c_long , pub rem : libc :: c_long , } # [ test ] fn bindgen_test_layout_ldiv_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < ldiv_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( ldiv_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < ldiv_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ldiv_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ldiv_t > ( ) ) ) . quot as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ldiv_t ) , "::" , stringify ! ( quot ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ldiv_t > ( ) ) ) . rem as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ldiv_t ) , "::" , stringify ! ( rem ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct lldiv_t { pub quot : libc :: c_longlong , pub rem : libc :: c_longlong , } # [ test ] fn bindgen_test_layout_lldiv_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < lldiv_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( lldiv_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < lldiv_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( lldiv_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < lldiv_t > ( ) ) ) . quot as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( lldiv_t ) , "::" , stringify ! ( quot ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < lldiv_t > ( ) ) ) . rem as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( lldiv_t ) , "::" , stringify ! ( rem ) ) ) ; } extern "C" { pub fn __ctype_get_mb_cur_max ( ) -> usize ; } extern "C" { pub fn atof ( __nptr : * const libc :: c_char ) -> f64 ; } extern "C" { pub fn atoi ( __nptr : * const libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn atol ( __nptr : * const libc :: c_char ) -> libc :: c_long ; } extern "C" { pub fn atoll ( __nptr : * const libc :: c_char ) -> libc :: c_longlong ; } extern "C" { pub fn strtod ( __nptr : * const libc :: c_char , __endptr : * mut * mut libc :: c_char ) -> f64 ; } extern "C" { pub fn strtof ( __nptr : * const libc :: c_char , __endptr : * mut * mut libc :: c_char ) -> f32 ; } extern "C" { pub fn strtold ( __nptr : * const libc :: c_char , __endptr : * mut * mut libc :: c_char ) -> u128 ; } extern "C" { pub fn strtol ( __nptr : * const libc :: c_char , __endptr : * mut * mut libc :: c_char , __base : libc :: c_int ) -> libc :: c_long ; } extern "C" { pub fn strtoul ( __nptr : * const libc :: c_char , __endptr : * mut * mut libc :: c_char , __base : libc :: c_int ) -> libc :: c_ulong ; } extern "C" { pub fn strtoq ( __nptr : * const libc :: c_char , __endptr : * mut * mut libc :: c_char , __base : libc :: c_int ) -> libc :: c_longlong ; } extern "C" { pub fn strtouq ( __nptr : * const libc :: c_char , __endptr : * mut * mut libc :: c_char , __base : libc :: c_int ) -> libc :: c_ulonglong ; } extern "C" { pub fn strtoll ( __nptr : * const libc :: c_char , __endptr : * mut * mut libc :: c_char , __base : libc :: c_int ) -> libc :: c_longlong ; } extern "C" { pub fn strtoull ( __nptr : * const libc :: c_char , __endptr : * mut * mut libc :: c_char , __base : libc :: c_int ) -> libc :: c_ulonglong ; } extern "C" { pub fn l64a ( __n : libc :: c_long ) -> * mut libc :: c_char ; } extern "C" { pub fn a64l ( __s : * const libc :: c_char ) -> libc :: c_long ; } pub type u_char = __u_char ; pub type u_short = __u_short ; pub type u_int = __u_int ; pub type u_long = __u_long ; pub type quad_t = __quad_t ; pub type u_quad_t = __u_quad_t ; pub type fsid_t = __fsid_t ; pub type loff_t = __loff_t ; pub type ino_t = __ino_t ; pub type dev_t = __dev_t ; pub type gid_t = __gid_t ; pub type mode_t = __mode_t ; pub type nlink_t = __nlink_t ; pub type uid_t = __uid_t ; pub type pid_t = __pid_t ; pub type id_t = __id_t ; pub type daddr_t = __daddr_t ; pub type caddr_t = __caddr_t ; pub type key_t = __key_t ; pub type clock_t = __clock_t ; pub type clockid_t = __clockid_t ; pub type time_t = __time_t ; pub type timer_t = __timer_t ; pub type ulong = libc :: c_ulong ; pub type ushort = libc :: c_ushort ; pub type uint = libc :: c_uint ; pub type u_int8_t = __uint8_t ; pub type u_int16_t = __uint16_t ; pub type u_int32_t = __uint32_t ; pub type u_int64_t = __uint64_t ; pub type register_t = libc :: c_long ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __sigset_t { pub __val : [ libc :: c_ulong ; 16usize ] , } # [ test ] fn bindgen_test_layout___sigset_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __sigset_t > ( ) , 128usize , concat ! ( "Size of: " , stringify ! ( __sigset_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __sigset_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __sigset_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __sigset_t > ( ) ) ) . __val as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __sigset_t ) , "::" , stringify ! ( __val ) ) ) ; } pub type sigset_t = __sigset_t ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct timeval { pub tv_sec : __time_t , pub tv_usec : __suseconds_t , } # [ test ] fn bindgen_test_layout_timeval ( ) { assert_eq ! ( :: core :: mem :: size_of :: < timeval > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( timeval ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < timeval > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( timeval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < timeval > ( ) ) ) . tv_sec as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( timeval ) , "::" , stringify ! ( tv_sec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < timeval > ( ) ) ) . tv_usec as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( timeval ) , "::" , stringify ! ( tv_usec ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct timespec { pub tv_sec : __time_t , pub tv_nsec : __syscall_slong_t , } # [ test ] fn bindgen_test_layout_timespec ( ) { assert_eq ! ( :: core :: mem :: size_of :: < timespec > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( timespec ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < timespec > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( timespec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < timespec > ( ) ) ) . tv_sec as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( timespec ) , "::" , stringify ! ( tv_sec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < timespec > ( ) ) ) . tv_nsec as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( timespec ) , "::" , stringify ! ( tv_nsec ) ) ) ; } pub type suseconds_t = __suseconds_t ; pub type __fd_mask = libc :: c_long ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct fd_set { pub __fds_bits : [ __fd_mask ; 16usize ] , } # [ test ] fn bindgen_test_layout_fd_set ( ) { assert_eq ! ( :: core :: mem :: size_of :: < fd_set > ( ) , 128usize , concat ! ( "Size of: " , stringify ! ( fd_set ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < fd_set > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( fd_set ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < fd_set > ( ) ) ) . __fds_bits as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( fd_set ) , "::" , stringify ! ( __fds_bits ) ) ) ; } pub type fd_mask = __fd_mask ; extern "C" { pub fn select ( __nfds : libc :: c_int , __readfds : * mut fd_set , __writefds : * mut fd_set , __exceptfds : * mut fd_set , __timeout : * mut timeval ) -> libc :: c_int ; } extern "C" { pub fn pselect ( __nfds : libc :: c_int , __readfds : * mut fd_set , __writefds : * mut fd_set , __exceptfds : * mut fd_set , __timeout : * const timespec , __sigmask : * const __sigset_t ) -> libc :: c_int ; } pub type blksize_t = __blksize_t ; pub type blkcnt_t = __blkcnt_t ; pub type fsblkcnt_t = __fsblkcnt_t ; pub type fsfilcnt_t = __fsfilcnt_t ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __pthread_internal_list { pub __prev : * mut __pthread_internal_list , pub __next : * mut __pthread_internal_list , } # [ test ] fn bindgen_test_layout___pthread_internal_list ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __pthread_internal_list > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( __pthread_internal_list ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __pthread_internal_list > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __pthread_internal_list ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_internal_list > ( ) ) ) . __prev as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_internal_list ) , "::" , stringify ! ( __prev ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_internal_list > ( ) ) ) . __next as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_internal_list ) , "::" , stringify ! ( __next ) ) ) ; } pub type __pthread_list_t = __pthread_internal_list ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __pthread_internal_slist { pub __next : * mut __pthread_internal_slist , } # [ test ] fn bindgen_test_layout___pthread_internal_slist ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __pthread_internal_slist > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __pthread_internal_slist ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __pthread_internal_slist > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __pthread_internal_slist ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_internal_slist > ( ) ) ) . __next as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_internal_slist ) , "::" , stringify ! ( __next ) ) ) ; } pub type __pthread_slist_t = __pthread_internal_slist ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __pthread_mutex_s { pub __lock : libc :: c_int , pub __count : libc :: c_uint , pub __owner : libc :: c_int , pub __nusers : libc :: c_uint , pub __kind : libc :: c_int , pub __spins : libc :: c_short , pub __elision : libc :: c_short , pub __list : __pthread_list_t , } # [ test ] fn bindgen_test_layout___pthread_mutex_s ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __pthread_mutex_s > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( __pthread_mutex_s ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __pthread_mutex_s > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __pthread_mutex_s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __lock as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __lock ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __count as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __owner as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __owner ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __nusers as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __nusers ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __kind as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __kind ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __spins as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __spins ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __elision as * const _ as usize } , 22usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __elision ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __list as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __list ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __pthread_rwlock_arch_t { pub __readers : libc :: c_uint , pub __writers : libc :: c_uint , pub __wrphase_futex : libc :: c_uint , pub __writers_futex : libc :: c_uint , pub __pad3 : libc :: c_uint , pub __pad4 : libc :: c_uint , pub __cur_writer : libc :: c_int , pub __shared : libc :: c_int , pub __rwelision : libc :: c_schar , pub __pad1 : [ libc :: c_uchar ; 7usize ] , pub __pad2 : libc :: c_ulong , pub __flags : libc :: c_uint , } # [ test ] fn bindgen_test_layout___pthread_rwlock_arch_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __pthread_rwlock_arch_t > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( __pthread_rwlock_arch_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __pthread_rwlock_arch_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __pthread_rwlock_arch_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __readers as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __readers ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __writers as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __writers ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __wrphase_futex as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __wrphase_futex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __writers_futex as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __writers_futex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __pad3 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __pad3 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __pad4 as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __pad4 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __cur_writer as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __cur_writer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __shared as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __shared ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __rwelision as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __rwelision ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __pad1 as * const _ as usize } , 33usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __pad1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __pad2 as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __pad2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __flags as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __flags ) ) ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct __pthread_cond_s { pub __bindgen_anon_1 : __pthread_cond_s__bindgen_ty_1 , pub __bindgen_anon_2 : __pthread_cond_s__bindgen_ty_2 , pub __g_refs : [ libc :: c_uint ; 2usize ] , pub __g_size : [ libc :: c_uint ; 2usize ] , pub __g1_orig_size : libc :: c_uint , pub __wrefs : libc :: c_uint , pub __g_signals : [ libc :: c_uint ; 2usize ] , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union __pthread_cond_s__bindgen_ty_1 { pub __wseq : libc :: c_ulonglong , pub __wseq32 : __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 , _bindgen_union_align : u64 , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 { pub __low : libc :: c_uint , pub __high : libc :: c_uint , } # [ test ] fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . __low as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( __low ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . __high as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( __high ) ) ) ; } # [ test ] fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __pthread_cond_s__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __pthread_cond_s__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __pthread_cond_s__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __pthread_cond_s__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_cond_s__bindgen_ty_1 > ( ) ) ) . __wseq as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_1 ) , "::" , stringify ! ( __wseq ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_cond_s__bindgen_ty_1 > ( ) ) ) . __wseq32 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_1 ) , "::" , stringify ! ( __wseq32 ) ) ) ; } impl :: core :: fmt :: Debug for __pthread_cond_s__bindgen_ty_1 { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "__pthread_cond_s__bindgen_ty_1 {{ union }}" ) } } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union __pthread_cond_s__bindgen_ty_2 { pub __g1_start : libc :: c_ulonglong , pub __g1_start32 : __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 , _bindgen_union_align : u64 , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 { pub __low : libc :: c_uint , pub __high : libc :: c_uint , } # [ test ] fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 > ( ) ) ) . __low as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 ) , "::" , stringify ! ( __low ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 > ( ) ) ) . __high as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 ) , "::" , stringify ! ( __high ) ) ) ; } # [ test ] fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __pthread_cond_s__bindgen_ty_2 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __pthread_cond_s__bindgen_ty_2 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __pthread_cond_s__bindgen_ty_2 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __pthread_cond_s__bindgen_ty_2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_cond_s__bindgen_ty_2 > ( ) ) ) . __g1_start as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_2 ) , "::" , stringify ! ( __g1_start ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_cond_s__bindgen_ty_2 > ( ) ) ) . __g1_start32 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_2 ) , "::" , stringify ! ( __g1_start32 ) ) ) ; } impl :: core :: fmt :: Debug for __pthread_cond_s__bindgen_ty_2 { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "__pthread_cond_s__bindgen_ty_2 {{ union }}" ) } } # [ test ] fn bindgen_test_layout___pthread_cond_s ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __pthread_cond_s > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( __pthread_cond_s ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __pthread_cond_s > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __pthread_cond_s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_cond_s > ( ) ) ) . __g_refs as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s ) , "::" , stringify ! ( __g_refs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_cond_s > ( ) ) ) . __g_size as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s ) , "::" , stringify ! ( __g_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_cond_s > ( ) ) ) . __g1_orig_size as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s ) , "::" , stringify ! ( __g1_orig_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_cond_s > ( ) ) ) . __wrefs as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s ) , "::" , stringify ! ( __wrefs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __pthread_cond_s > ( ) ) ) . __g_signals as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s ) , "::" , stringify ! ( __g_signals ) ) ) ; } impl :: core :: fmt :: Debug for __pthread_cond_s { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "__pthread_cond_s {{ __bindgen_anon_1: {:?}, __bindgen_anon_2: {:?}, __g_refs: {:?}, __g_size: {:?}, __g1_orig_size: {:?}, __wrefs: {:?}, __g_signals: {:?} }}" , self . __bindgen_anon_1 , self . __bindgen_anon_2 , self . __g_refs , self . __g_size , self . __g1_orig_size , self . __wrefs , self . __g_signals ) } } pub type pthread_t = libc :: c_ulong ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_mutexattr_t { pub __size : [ libc :: c_char ; 4usize ] , pub __align : libc :: c_int , _bindgen_union_align : u32 , } # [ test ] fn bindgen_test_layout_pthread_mutexattr_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_mutexattr_t > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( pthread_mutexattr_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_mutexattr_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( pthread_mutexattr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_mutexattr_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutexattr_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_mutexattr_t > ( ) ) ) . __align as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutexattr_t ) , "::" , stringify ! ( __align ) ) ) ; } impl :: core :: fmt :: Debug for pthread_mutexattr_t { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "pthread_mutexattr_t {{ union }}" ) } } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_condattr_t { pub __size : [ libc :: c_char ; 4usize ] , pub __align : libc :: c_int , _bindgen_union_align : u32 , } # [ test ] fn bindgen_test_layout_pthread_condattr_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_condattr_t > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( pthread_condattr_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_condattr_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( pthread_condattr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_condattr_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_condattr_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_condattr_t > ( ) ) ) . __align as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_condattr_t ) , "::" , stringify ! ( __align ) ) ) ; } impl :: core :: fmt :: Debug for pthread_condattr_t { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "pthread_condattr_t {{ union }}" ) } } pub type pthread_key_t = libc :: c_uint ; pub type pthread_once_t = libc :: c_int ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_attr_t { pub __size : [ libc :: c_char ; 56usize ] , pub __align : libc :: c_long , _bindgen_union_align : [ u64 ; 7usize ] , } # [ test ] fn bindgen_test_layout_pthread_attr_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_attr_t > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( pthread_attr_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_attr_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_attr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_attr_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_attr_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_attr_t > ( ) ) ) . __align as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_attr_t ) , "::" , stringify ! ( __align ) ) ) ; } impl :: core :: fmt :: Debug for pthread_attr_t { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "pthread_attr_t {{ union }}" ) } } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_mutex_t { pub __data : __pthread_mutex_s , pub __size : [ libc :: c_char ; 40usize ] , pub __align : libc :: c_long , _bindgen_union_align : [ u64 ; 5usize ] , } # [ test ] fn bindgen_test_layout_pthread_mutex_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_mutex_t > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( pthread_mutex_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_mutex_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_mutex_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_mutex_t > ( ) ) ) . __data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutex_t ) , "::" , stringify ! ( __data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_mutex_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutex_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_mutex_t > ( ) ) ) . __align as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutex_t ) , "::" , stringify ! ( __align ) ) ) ; } impl :: core :: fmt :: Debug for pthread_mutex_t { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "pthread_mutex_t {{ union }}" ) } } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_cond_t { pub __data : __pthread_cond_s , pub __size : [ libc :: c_char ; 48usize ] , pub __align : libc :: c_longlong , _bindgen_union_align : [ u64 ; 6usize ] , } # [ test ] fn bindgen_test_layout_pthread_cond_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_cond_t > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( pthread_cond_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_cond_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_cond_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_cond_t > ( ) ) ) . __data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_cond_t ) , "::" , stringify ! ( __data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_cond_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_cond_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_cond_t > ( ) ) ) . __align as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_cond_t ) , "::" , stringify ! ( __align ) ) ) ; } impl :: core :: fmt :: Debug for pthread_cond_t { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "pthread_cond_t {{ union }}" ) } } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_rwlock_t { pub __data : __pthread_rwlock_arch_t , pub __size : [ libc :: c_char ; 56usize ] , pub __align : libc :: c_long , _bindgen_union_align : [ u64 ; 7usize ] , } # [ test ] fn bindgen_test_layout_pthread_rwlock_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_rwlock_t > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( pthread_rwlock_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_rwlock_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_rwlock_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_rwlock_t > ( ) ) ) . __data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_rwlock_t ) , "::" , stringify ! ( __data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_rwlock_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_rwlock_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_rwlock_t > ( ) ) ) . __align as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_rwlock_t ) , "::" , stringify ! ( __align ) ) ) ; } impl :: core :: fmt :: Debug for pthread_rwlock_t { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "pthread_rwlock_t {{ union }}" ) } } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_rwlockattr_t { pub __size : [ libc :: c_char ; 8usize ] , pub __align : libc :: c_long , _bindgen_union_align : u64 , } # [ test ] fn bindgen_test_layout_pthread_rwlockattr_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_rwlockattr_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( pthread_rwlockattr_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_rwlockattr_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_rwlockattr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_rwlockattr_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_rwlockattr_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_rwlockattr_t > ( ) ) ) . __align as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_rwlockattr_t ) , "::" , stringify ! ( __align ) ) ) ; } impl :: core :: fmt :: Debug for pthread_rwlockattr_t { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "pthread_rwlockattr_t {{ union }}" ) } } pub type pthread_spinlock_t = libc :: c_int ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_barrier_t { pub __size : [ libc :: c_char ; 32usize ] , pub __align : libc :: c_long , _bindgen_union_align : [ u64 ; 4usize ] , } # [ test ] fn bindgen_test_layout_pthread_barrier_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_barrier_t > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( pthread_barrier_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_barrier_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_barrier_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_barrier_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_barrier_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_barrier_t > ( ) ) ) . __align as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_barrier_t ) , "::" , stringify ! ( __align ) ) ) ; } impl :: core :: fmt :: Debug for pthread_barrier_t { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "pthread_barrier_t {{ union }}" ) } } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_barrierattr_t { pub __size : [ libc :: c_char ; 4usize ] , pub __align : libc :: c_int , _bindgen_union_align : u32 , } # [ test ] fn bindgen_test_layout_pthread_barrierattr_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_barrierattr_t > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( pthread_barrierattr_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_barrierattr_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( pthread_barrierattr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_barrierattr_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_barrierattr_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_barrierattr_t > ( ) ) ) . __align as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_barrierattr_t ) , "::" , stringify ! ( __align ) ) ) ; } impl :: core :: fmt :: Debug for pthread_barrierattr_t { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "pthread_barrierattr_t {{ union }}" ) } } extern "C" { pub fn random ( ) -> libc :: c_long ; } extern "C" { pub fn srandom ( __seed : libc :: c_uint ) ; } extern "C" { pub fn initstate ( __seed : libc :: c_uint , __statebuf : * mut libc :: c_char , __statelen : usize ) -> * mut libc :: c_char ; } extern "C" { pub fn setstate ( __statebuf : * mut libc :: c_char ) -> * mut libc :: c_char ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct random_data { pub fptr : * mut i32 , pub rptr : * mut i32 , pub state : * mut i32 , pub rand_type : libc :: c_int , pub rand_deg : libc :: c_int , pub rand_sep : libc :: c_int , pub end_ptr : * mut i32 , } # [ test ] fn bindgen_test_layout_random_data ( ) { assert_eq ! ( :: core :: mem :: size_of :: < random_data > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( random_data ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < random_data > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( random_data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < random_data > ( ) ) ) . fptr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( fptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < random_data > ( ) ) ) . rptr as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( rptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < random_data > ( ) ) ) . state as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < random_data > ( ) ) ) . rand_type as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( rand_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < random_data > ( ) ) ) . rand_deg as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( rand_deg ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < random_data > ( ) ) ) . rand_sep as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( rand_sep ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < random_data > ( ) ) ) . end_ptr as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( end_ptr ) ) ) ; } extern "C" { pub fn random_r ( __buf : * mut random_data , __result : * mut i32 ) -> libc :: c_int ; } extern "C" { pub fn srandom_r ( __seed : libc :: c_uint , __buf : * mut random_data ) -> libc :: c_int ; } extern "C" { pub fn initstate_r ( __seed : libc :: c_uint , __statebuf : * mut libc :: c_char , __statelen : usize , __buf : * mut random_data ) -> libc :: c_int ; } extern "C" { pub fn setstate_r ( __statebuf : * mut libc :: c_char , __buf : * mut random_data ) -> libc :: c_int ; } extern "C" { pub fn rand ( ) -> libc :: c_int ; } extern "C" { pub fn srand ( __seed : libc :: c_uint ) ; } extern "C" { pub fn rand_r ( __seed : * mut libc :: c_uint ) -> libc :: c_int ; } extern "C" { pub fn drand48 ( ) -> f64 ; } extern "C" { pub fn erand48 ( __xsubi : * mut libc :: c_ushort ) -> f64 ; } extern "C" { pub fn lrand48 ( ) -> libc :: c_long ; } extern "C" { pub fn nrand48 ( __xsubi : * mut libc :: c_ushort ) -> libc :: c_long ; } extern "C" { pub fn mrand48 ( ) -> libc :: c_long ; } extern "C" { pub fn jrand48 ( __xsubi : * mut libc :: c_ushort ) -> libc :: c_long ; } extern "C" { pub fn srand48 ( __seedval : libc :: c_long ) ; } extern "C" { pub fn seed48 ( __seed16v : * mut libc :: c_ushort ) -> * mut libc :: c_ushort ; } extern "C" { pub fn lcong48 ( __param : * mut libc :: c_ushort ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct drand48_data { pub __x : [ libc :: c_ushort ; 3usize ] , pub __old_x : [ libc :: c_ushort ; 3usize ] , pub __c : libc :: c_ushort , pub __init : libc :: c_ushort , pub __a : libc :: c_ulonglong , } # [ test ] fn bindgen_test_layout_drand48_data ( ) { assert_eq ! ( :: core :: mem :: size_of :: < drand48_data > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( drand48_data ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < drand48_data > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( drand48_data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < drand48_data > ( ) ) ) . __x as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( drand48_data ) , "::" , stringify ! ( __x ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < drand48_data > ( ) ) ) . __old_x as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( drand48_data ) , "::" , stringify ! ( __old_x ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < drand48_data > ( ) ) ) . __c as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( drand48_data ) , "::" , stringify ! ( __c ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < drand48_data > ( ) ) ) . __init as * const _ as usize } , 14usize , concat ! ( "Offset of field: " , stringify ! ( drand48_data ) , "::" , stringify ! ( __init ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < drand48_data > ( ) ) ) . __a as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( drand48_data ) , "::" , stringify ! ( __a ) ) ) ; } extern "C" { pub fn drand48_r ( __buffer : * mut drand48_data , __result : * mut f64 ) -> libc :: c_int ; } extern "C" { pub fn erand48_r ( __xsubi : * mut libc :: c_ushort , __buffer : * mut drand48_data , __result : * mut f64 ) -> libc :: c_int ; } extern "C" { pub fn lrand48_r ( __buffer : * mut drand48_data , __result : * mut libc :: c_long ) -> libc :: c_int ; } extern "C" { pub fn nrand48_r ( __xsubi : * mut libc :: c_ushort , __buffer : * mut drand48_data , __result : * mut libc :: c_long ) -> libc :: c_int ; } extern "C" { pub fn mrand48_r ( __buffer : * mut drand48_data , __result : * mut libc :: c_long ) -> libc :: c_int ; } extern "C" { pub fn jrand48_r ( __xsubi : * mut libc :: c_ushort , __buffer : * mut drand48_data , __result : * mut libc :: c_long ) -> libc :: c_int ; } extern "C" { pub fn srand48_r ( __seedval : libc :: c_long , __buffer : * mut drand48_data ) -> libc :: c_int ; } extern "C" { pub fn seed48_r ( __seed16v : * mut libc :: c_ushort , __buffer : * mut drand48_data ) -> libc :: c_int ; } extern "C" { pub fn lcong48_r ( __param : * mut libc :: c_ushort , __buffer : * mut drand48_data ) -> libc :: c_int ; } extern "C" { pub fn malloc ( __size : libc :: c_ulong ) -> * mut libc :: c_void ; } extern "C" { pub fn calloc ( __nmemb : libc :: c_ulong , __size : libc :: c_ulong ) -> * mut libc :: c_void ; } extern "C" { pub fn realloc ( __ptr : * mut libc :: c_void , __size : libc :: c_ulong ) -> * mut libc :: c_void ; } extern "C" { pub fn reallocarray ( __ptr : * mut libc :: c_void , __nmemb : usize , __size : usize ) -> * mut libc :: c_void ; } extern "C" { pub fn free ( __ptr : * mut libc :: c_void ) ; } extern "C" { pub fn alloca ( __size : libc :: c_ulong ) -> * mut libc :: c_void ; } extern "C" { pub fn valloc ( __size : usize ) -> * mut libc :: c_void ; } extern "C" { pub fn posix_memalign ( __memptr : * mut * mut libc :: c_void , __alignment : usize , __size : usize ) -> libc :: c_int ; } extern "C" { pub fn aligned_alloc ( __alignment : usize , __size : usize ) -> * mut libc :: c_void ; } extern "C" { pub fn abort ( ) ; } extern "C" { pub fn atexit ( __func : :: core :: option :: Option < unsafe extern "C" fn ( ) > ) -> libc :: c_int ; } extern "C" { pub fn at_quick_exit ( __func : :: core :: option :: Option < unsafe extern "C" fn ( ) > ) -> libc :: c_int ; } extern "C" { pub fn on_exit ( __func : :: core :: option :: Option < unsafe extern "C" fn ( __status : libc :: c_int , __arg : * mut libc :: c_void ) > , __arg : * mut libc :: c_void ) -> libc :: c_int ; } extern "C" { pub fn exit ( __status : libc :: c_int ) ; } extern "C" { pub fn quick_exit ( __status : libc :: c_int ) ; } extern "C" { pub fn _Exit ( __status : libc :: c_int ) ; } extern "C" { pub fn getenv ( __name : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn putenv ( __string : * mut libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn setenv ( __name : * const libc :: c_char , __value : * const libc :: c_char , __replace : libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn unsetenv ( __name : * const libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn clearenv ( ) -> libc :: c_int ; } extern "C" { pub fn mktemp ( __template : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn mkstemp ( __template : * mut libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn mkstemps ( __template : * mut libc :: c_char , __suffixlen : libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn mkdtemp ( __template : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn system ( __command : * const libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn realpath ( __name : * const libc :: c_char , __resolved : * mut libc :: c_char ) -> * mut libc :: c_char ; } pub type __compar_fn_t = :: core :: option :: Option < unsafe extern "C" fn ( arg1 : * const libc :: c_void , arg2 : * const libc :: c_void ) -> libc :: c_int > ; extern "C" { pub fn bsearch ( __key : * const libc :: c_void , __base : * const libc :: c_void , __nmemb : usize , __size : usize , __compar : __compar_fn_t ) -> * mut libc :: c_void ; } extern "C" { pub fn qsort ( __base : * mut libc :: c_void , __nmemb : usize , __size : usize , __compar : __compar_fn_t ) ; } extern "C" { pub fn abs ( __x : libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn labs ( __x : libc :: c_long ) -> libc :: c_long ; } extern "C" { pub fn llabs ( __x : libc :: c_longlong ) -> libc :: c_longlong ; } extern "C" { pub fn div ( __numer : libc :: c_int , __denom : libc :: c_int ) -> div_t ; } extern "C" { pub fn ldiv ( __numer : libc :: c_long , __denom : libc :: c_long ) -> ldiv_t ; } extern "C" { pub fn lldiv ( __numer : libc :: c_longlong , __denom : libc :: c_longlong ) -> lldiv_t ; } extern "C" { pub fn ecvt ( __value : f64 , __ndigit : libc :: c_int , __decpt : * mut libc :: c_int , __sign : * mut libc :: c_int ) -> * mut libc :: c_char ; } extern "C" { pub fn fcvt ( __value : f64 , __ndigit : libc :: c_int , __decpt : * mut libc :: c_int , __sign : * mut libc :: c_int ) -> * mut libc :: c_char ; } extern "C" { pub fn gcvt ( __value : f64 , __ndigit : libc :: c_int , __buf : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn qecvt ( __value : u128 , __ndigit : libc :: c_int , __decpt : * mut libc :: c_int , __sign : * mut libc :: c_int ) -> * mut libc :: c_char ; } extern "C" { pub fn qfcvt ( __value : u128 , __ndigit : libc :: c_int , __decpt : * mut libc :: c_int , __sign : * mut libc :: c_int ) -> * mut libc :: c_char ; } extern "C" { pub fn qgcvt ( __value : u128 , __ndigit : libc :: c_int , __buf : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn ecvt_r ( __value : f64 , __ndigit : libc :: c_int , __decpt : * mut libc :: c_int , __sign : * mut libc :: c_int , __buf : * mut libc :: c_char , __len : usize ) -> libc :: c_int ; } extern "C" { pub fn fcvt_r ( __value : f64 , __ndigit : libc :: c_int , __decpt : * mut libc :: c_int , __sign : * mut libc :: c_int , __buf : * mut libc :: c_char , __len : usize ) -> libc :: c_int ; } extern "C" { pub fn qecvt_r ( __value : u128 , __ndigit : libc :: c_int , __decpt : * mut libc :: c_int , __sign : * mut libc :: c_int , __buf : * mut libc :: c_char , __len : usize ) -> libc :: c_int ; } extern "C" { pub fn qfcvt_r ( __value : u128 , __ndigit : libc :: c_int , __decpt : * mut libc :: c_int , __sign : * mut libc :: c_int , __buf : * mut libc :: c_char , __len : usize ) -> libc :: c_int ; } extern "C" { pub fn mblen ( __s : * const libc :: c_char , __n : usize ) -> libc :: c_int ; } extern "C" { pub fn mbtowc ( __pwc : * mut wchar_t , __s : * const libc :: c_char , __n : usize ) -> libc :: c_int ; } extern "C" { pub fn wctomb ( __s : * mut libc :: c_char , __wchar : wchar_t ) -> libc :: c_int ; } extern "C" { pub fn mbstowcs ( __pwcs : * mut wchar_t , __s : * const libc :: c_char , __n : usize ) -> usize ; } extern "C" { pub fn wcstombs ( __s : * mut libc :: c_char , __pwcs : * const wchar_t , __n : usize ) -> usize ; } extern "C" { pub fn rpmatch ( __response : * const libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn getsubopt ( __optionp : * mut * mut libc :: c_char , __tokens : * const * mut libc :: c_char , __valuep : * mut * mut libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn getloadavg ( __loadavg : * mut f64 , __nelem : libc :: c_int ) -> libc :: c_int ; } pub type address_t = [ u8 ; 20usize ] ; pub type bytes32_t = [ u8 ; 32usize ] ; pub type wlen_t = uint_fast8_t ; # [ doc = " a byte array" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct bytes { # [ doc = "< the byte-data" ] pub data : * mut u8 , # [ doc = "< the length of the array ion bytes" ] pub len : u32 , } # [ test ] fn bindgen_test_layout_bytes ( ) { assert_eq ! ( :: core :: mem :: size_of :: < bytes > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( bytes ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < bytes > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( bytes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bytes > ( ) ) ) . data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( bytes ) , "::" , stringify ! ( data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bytes > ( ) ) ) . len as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( bytes ) , "::" , stringify ! ( len ) ) ) ; } # [ doc = " a byte array" ] pub type bytes_t = bytes ; # [ doc = " a byte-buffer to attach byte-functions." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct bytes_builder_t { # [ doc = "< size of the currently allocated bytes" ] pub bsize : usize , # [ doc = "< the bytes struct" ] pub b : bytes_t , } # [ test ] fn bindgen_test_layout_bytes_builder_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < bytes_builder_t > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( bytes_builder_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < bytes_builder_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( bytes_builder_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bytes_builder_t > ( ) ) ) . bsize as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( bytes_builder_t ) , "::" , stringify ! ( bsize ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bytes_builder_t > ( ) ) ) . b as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( bytes_builder_t ) , "::" , stringify ! ( b ) ) ) ; } extern "C" { pub fn b_new ( data : * const u8 , len : u32 ) -> * mut bytes_t ; } extern "C" { pub fn b_print ( a : * const bytes_t ) ; } extern "C" { pub fn ba_print ( a : * const u8 , l : usize ) ; } extern "C" { pub fn b_cmp ( a : * const bytes_t , b : * const bytes_t ) -> libc :: c_int ; } extern "C" { pub fn bytes_cmp ( a : bytes_t , b : bytes_t ) -> libc :: c_int ; } extern "C" { pub fn b_free ( a : * mut bytes_t ) ; } extern "C" { pub fn b_dup ( a : * const bytes_t ) -> * mut bytes_t ; } extern "C" { pub fn b_read_byte ( b : * mut bytes_t , pos : * mut usize ) -> u8 ; } extern "C" { pub fn b_read_int ( b : * mut bytes_t , pos : * mut usize ) -> u32 ; } extern "C" { pub fn b_read_long ( b : * mut bytes_t , pos : * mut usize ) -> u64 ; } extern "C" { pub fn b_new_chars ( b : * mut bytes_t , pos : * mut usize ) -> * mut libc :: c_char ; } extern "C" { pub fn b_new_fixed_bytes ( b : * mut bytes_t , pos : * mut usize , len : libc :: c_int ) -> * mut bytes_t ; } extern "C" { pub fn bb_newl ( l : usize ) -> * mut bytes_builder_t ; } extern "C" { pub fn bb_free ( bb : * mut bytes_builder_t ) ; } extern "C" { pub fn bb_check_size ( bb : * mut bytes_builder_t , len : usize ) -> libc :: c_int ; } extern "C" { pub fn bb_write_chars ( bb : * mut bytes_builder_t , c : * mut libc :: c_char , len : libc :: c_int ) ; } extern "C" { pub fn bb_write_dyn_bytes ( bb : * mut bytes_builder_t , src : * const bytes_t ) ; } extern "C" { pub fn bb_write_fixed_bytes ( bb : * mut bytes_builder_t , src : * const bytes_t ) ; } extern "C" { pub fn bb_write_int ( bb : * mut bytes_builder_t , val : u32 ) ; } extern "C" { pub fn bb_write_long ( bb : * mut bytes_builder_t , val : u64 ) ; } extern "C" { pub fn bb_write_long_be ( bb : * mut bytes_builder_t , val : u64 , len : libc :: c_int ) ; } extern "C" { pub fn bb_write_byte ( bb : * mut bytes_builder_t , val : u8 ) ; } extern "C" { pub fn bb_write_raw_bytes ( bb : * mut bytes_builder_t , ptr : * mut libc :: c_void , len : usize ) ; } extern "C" { pub fn bb_clear ( bb : * mut bytes_builder_t ) ; } extern "C" { pub fn bb_replace ( bb : * mut bytes_builder_t , offset : libc :: c_int , delete_len : libc :: c_int , data : * mut u8 , data_len : libc :: c_int ) ; } extern "C" { pub fn bb_move_to_bytes ( bb : * mut bytes_builder_t ) -> * mut bytes_t ; } extern "C" { pub fn bb_read_long ( bb : * mut bytes_builder_t , i : * mut usize ) -> u64 ; } extern "C" { pub fn bb_read_int ( bb : * mut bytes_builder_t , i : * mut usize ) -> u32 ; } extern "C" { pub fn cloned_bytes ( data : bytes_t ) -> bytes_t ; } # [ repr ( C ) ] # [ repr ( align ( 16 ) ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct max_align_t { pub __clang_max_align_nonce1 : libc :: c_longlong , pub __bindgen_padding_0 : u64 , pub __clang_max_align_nonce2 : u128 , } # [ test ] fn bindgen_test_layout_max_align_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < max_align_t > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( max_align_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < max_align_t > ( ) , 16usize , concat ! ( "Alignment of " , stringify ! ( max_align_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < max_align_t > ( ) ) ) . __clang_max_align_nonce1 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( max_align_t ) , "::" , stringify ! ( __clang_max_align_nonce1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < max_align_t > ( ) ) ) . __clang_max_align_nonce2 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( max_align_t ) , "::" , stringify ! ( __clang_max_align_nonce2 ) ) ) ; } # [ doc = " string build struct, which is able to hold and modify a growing string." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sb { # [ doc = "< the current string (null terminated)" ] pub data : * mut libc :: c_char , # [ doc = "< number of bytes currently allocated" ] pub allocted : usize , # [ doc = "< the current length of the string" ] pub len : usize , } # [ test ] fn bindgen_test_layout_sb ( ) { assert_eq ! ( :: core :: mem :: size_of :: < sb > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( sb ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < sb > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < sb > ( ) ) ) . data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sb ) , "::" , stringify ! ( data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < sb > ( ) ) ) . allocted as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sb ) , "::" , stringify ! ( allocted ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < sb > ( ) ) ) . len as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( sb ) , "::" , stringify ! ( len ) ) ) ; } # [ doc = " string build struct, which is able to hold and modify a growing string." ] pub type sb_t = sb ; extern "C" { pub fn sb_new ( chars : * const libc :: c_char ) -> * mut sb_t ; } extern "C" { pub fn sb_init ( sb : * mut sb_t ) -> * mut sb_t ; } extern "C" { pub fn sb_free ( sb : * mut sb_t ) ; } extern "C" { pub fn sb_add_char ( sb : * mut sb_t , c : libc :: c_char ) -> * mut sb_t ; } extern "C" { pub fn sb_add_chars ( sb : * mut sb_t , chars : * const libc :: c_char ) -> * mut sb_t ; } extern "C" { pub fn sb_add_range ( sb : * mut sb_t , chars : * const libc :: c_char , start : libc :: c_int , len : libc :: c_int ) -> * mut sb_t ; } extern "C" { pub fn sb_add_key_value ( sb : * mut sb_t , key : * const libc :: c_char , value : * const libc :: c_char , value_len : libc :: c_int , as_string : bool ) -> * mut sb_t ; } extern "C" { pub fn sb_add_bytes ( sb : * mut sb_t , prefix : * const libc :: c_char , bytes : * const bytes_t , len : libc :: c_int , as_array : bool ) -> * mut sb_t ; } extern "C" { pub fn sb_add_hexuint_l ( sb : * mut sb_t , uint : uintmax_t , l : usize ) -> * mut sb_t ; } extern "C" { pub fn memcpy ( __dest : * mut libc :: c_void , __src : * const libc :: c_void , __n : libc :: c_ulong ) -> * mut libc :: c_void ; } extern "C" { pub fn memmove ( __dest : * mut libc :: c_void , __src : * const libc :: c_void , __n : libc :: c_ulong ) -> * mut libc :: c_void ; } extern "C" { pub fn memccpy ( __dest : * mut libc :: c_void , __src : * const libc :: c_void , __c : libc :: c_int , __n : libc :: c_ulong ) -> * mut libc :: c_void ; } extern "C" { pub fn memset ( __s : * mut libc :: c_void , __c : libc :: c_int , __n : libc :: c_ulong ) -> * mut libc :: c_void ; } extern "C" { pub fn memcmp ( __s1 : * const libc :: c_void , __s2 : * const libc :: c_void , __n : libc :: c_ulong ) -> libc :: c_int ; } extern "C" { pub fn memchr ( __s : * const libc :: c_void , __c : libc :: c_int , __n : libc :: c_ulong ) -> * mut libc :: c_void ; } extern "C" { pub fn strcpy ( __dest : * mut libc :: c_char , __src : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn strncpy ( __dest : * mut libc :: c_char , __src : * const libc :: c_char , __n : libc :: c_ulong ) -> * mut libc :: c_char ; } extern "C" { pub fn strcat ( __dest : * mut libc :: c_char , __src : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn strncat ( __dest : * mut libc :: c_char , __src : * const libc :: c_char , __n : libc :: c_ulong ) -> * mut libc :: c_char ; } extern "C" { pub fn strcmp ( __s1 : * const libc :: c_char , __s2 : * const libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn strncmp ( __s1 : * const libc :: c_char , __s2 : * const libc :: c_char , __n : libc :: c_ulong ) -> libc :: c_int ; } extern "C" { pub fn strcoll ( __s1 : * const libc :: c_char , __s2 : * const libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn strxfrm ( __dest : * mut libc :: c_char , __src : * const libc :: c_char , __n : libc :: c_ulong ) -> libc :: c_ulong ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __locale_struct { pub __locales : [ * mut __locale_data ; 13usize ] , pub __ctype_b : * const libc :: c_ushort , pub __ctype_tolower : * const libc :: c_int , pub __ctype_toupper : * const libc :: c_int , pub __names : [ * const libc :: c_char ; 13usize ] , } # [ test ] fn bindgen_test_layout___locale_struct ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __locale_struct > ( ) , 232usize , concat ! ( "Size of: " , stringify ! ( __locale_struct ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __locale_struct > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __locale_struct ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __locale_struct > ( ) ) ) . __locales as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __locale_struct ) , "::" , stringify ! ( __locales ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __locale_struct > ( ) ) ) . __ctype_b as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( __locale_struct ) , "::" , stringify ! ( __ctype_b ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __locale_struct > ( ) ) ) . __ctype_tolower as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( __locale_struct ) , "::" , stringify ! ( __ctype_tolower ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __locale_struct > ( ) ) ) . __ctype_toupper as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( __locale_struct ) , "::" , stringify ! ( __ctype_toupper ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __locale_struct > ( ) ) ) . __names as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( __locale_struct ) , "::" , stringify ! ( __names ) ) ) ; } pub type __locale_t = * mut __locale_struct ; pub type locale_t = __locale_t ; extern "C" { pub fn strcoll_l ( __s1 : * const libc :: c_char , __s2 : * const libc :: c_char , __l : locale_t ) -> libc :: c_int ; } extern "C" { pub fn strxfrm_l ( __dest : * mut libc :: c_char , __src : * const libc :: c_char , __n : usize , __l : locale_t ) -> usize ; } extern "C" { pub fn strdup ( __s : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn strndup ( __string : * const libc :: c_char , __n : libc :: c_ulong ) -> * mut libc :: c_char ; } extern "C" { pub fn strchr ( __s : * const libc :: c_char , __c : libc :: c_int ) -> * mut libc :: c_char ; } extern "C" { pub fn strrchr ( __s : * const libc :: c_char , __c : libc :: c_int ) -> * mut libc :: c_char ; } extern "C" { pub fn strcspn ( __s : * const libc :: c_char , __reject : * const libc :: c_char ) -> libc :: c_ulong ; } extern "C" { pub fn strspn ( __s : * const libc :: c_char , __accept : * const libc :: c_char ) -> libc :: c_ulong ; } extern "C" { pub fn strpbrk ( __s : * const libc :: c_char , __accept : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn strstr ( __haystack : * const libc :: c_char , __needle : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn strtok ( __s : * mut libc :: c_char , __delim : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn __strtok_r ( __s : * mut libc :: c_char , __delim : * const libc :: c_char , __save_ptr : * mut * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn strtok_r ( __s : * mut libc :: c_char , __delim : * const libc :: c_char , __save_ptr : * mut * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn strlen ( __s : * const libc :: c_char ) -> libc :: c_ulong ; } extern "C" { pub fn strnlen ( __string : * const libc :: c_char , __maxlen : usize ) -> usize ; } extern "C" { pub fn strerror ( __errnum : libc :: c_int ) -> * mut libc :: c_char ; } extern "C" { # [ link_name = "\u{1}__xpg_strerror_r" ] pub fn strerror_r ( __errnum : libc :: c_int , __buf : * mut libc :: c_char , __buflen : usize ) -> libc :: c_int ; } extern "C" { pub fn strerror_l ( __errnum : libc :: c_int , __l : locale_t ) -> * mut libc :: c_char ; } extern "C" { pub fn bcmp ( __s1 : * const libc :: c_void , __s2 : * const libc :: c_void , __n : libc :: c_ulong ) -> libc :: c_int ; } extern "C" { pub fn bcopy ( __src : * const libc :: c_void , __dest : * mut libc :: c_void , __n : usize ) ; } extern "C" { pub fn bzero ( __s : * mut libc :: c_void , __n : libc :: c_ulong ) ; } extern "C" { pub fn index ( __s : * const libc :: c_char , __c : libc :: c_int ) -> * mut libc :: c_char ; } extern "C" { pub fn rindex ( __s : * const libc :: c_char , __c : libc :: c_int ) -> * mut libc :: c_char ; } extern "C" { pub fn ffs ( __i : libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn ffsl ( __l : libc :: c_long ) -> libc :: c_int ; } extern "C" { pub fn ffsll ( __ll : libc :: c_longlong ) -> libc :: c_int ; } extern "C" { pub fn strcasecmp ( __s1 : * const libc :: c_char , __s2 : * const libc :: c_char ) -> libc :: c_int ; } extern "C" { pub fn strncasecmp ( __s1 : * const libc :: c_char , __s2 : * const libc :: c_char , __n : libc :: c_ulong ) -> libc :: c_int ; } extern "C" { pub fn strcasecmp_l ( __s1 : * const libc :: c_char , __s2 : * const libc :: c_char , __loc : locale_t ) -> libc :: c_int ; } extern "C" { pub fn strncasecmp_l ( __s1 : * const libc :: c_char , __s2 : * const libc :: c_char , __n : usize , __loc : locale_t ) -> libc :: c_int ; } extern "C" { pub fn explicit_bzero ( __s : * mut libc :: c_void , __n : usize ) ; } extern "C" { pub fn strsep ( __stringp : * mut * mut libc :: c_char , __delim : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn strsignal ( __sig : libc :: c_int ) -> * mut libc :: c_char ; } extern "C" { pub fn __stpcpy ( __dest : * mut libc :: c_char , __src : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn stpcpy ( __dest : * mut libc :: c_char , __src : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn __stpncpy ( __dest : * mut libc :: c_char , __src : * const libc :: c_char , __n : usize ) -> * mut libc :: c_char ; } extern "C" { pub fn stpncpy ( __dest : * mut libc :: c_char , __src : * const libc :: c_char , __n : libc :: c_ulong ) -> * mut libc :: c_char ; } pub type d_key_t = u16 ; # [ repr ( u32 ) ] # [ doc = " type of a token." ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum d_type_t { # [ doc = "< content is stored as data ptr." ] T_BYTES = 0 , # [ doc = "<content is stored a c-str" ] T_STRING = 1 , # [ doc = "< the node is an array with the length stored in length" ] T_ARRAY = 2 , # [ doc = "< the node is an object with properties" ] T_OBJECT = 3 , # [ doc = "< boolean with the value stored in len" ] T_BOOLEAN = 4 , # [ doc = "< a integer with the value stored" ] T_INTEGER = 5 , # [ doc = "< a NULL-value" ] T_NULL = 6 , } # [ doc = " a token holding any kind of value." ] # [ doc = "" ] # [ doc = " use d_type,  d_len or the cast-function to get the value." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct item { # [ doc = "< the byte or string-data" ] pub data : * mut u8 , # [ doc = "< the length of the content (or number of properties) depending +  type." ] pub len : u32 , # [ doc = "< the key of the property." ] pub key : d_key_t , } # [ test ] fn bindgen_test_layout_item ( ) { assert_eq ! ( :: core :: mem :: size_of :: < item > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( item ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < item > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( item ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < item > ( ) ) ) . data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( item ) , "::" , stringify ! ( data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < item > ( ) ) ) . len as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( item ) , "::" , stringify ! ( len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < item > ( ) ) ) . key as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( item ) , "::" , stringify ! ( key ) ) ) ; } # [ doc = " a token holding any kind of value." ] # [ doc = "" ] # [ doc = " use d_type,  d_len or the cast-function to get the value." ] pub type d_token_t = item ; # [ doc = " internal type used to represent the a range within a string." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct str_range { # [ doc = "< pointer to the start of the string" ] pub data : * mut libc :: c_char , # [ doc = "< len of the characters" ] pub len : usize , } # [ test ] fn bindgen_test_layout_str_range ( ) { assert_eq ! ( :: core :: mem :: size_of :: < str_range > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( str_range ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < str_range > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( str_range ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < str_range > ( ) ) ) . data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( str_range ) , "::" , stringify ! ( data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < str_range > ( ) ) ) . len as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( str_range ) , "::" , stringify ! ( len ) ) ) ; } # [ doc = " internal type used to represent the a range within a string." ] pub type str_range_t = str_range ; # [ doc = " parser for json or binary-data. it needs to freed after usage." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct json_parser { # [ doc = "< the list of all tokens. the first token is the main-token as returned by the parser." ] pub result : * mut d_token_t , pub c : * mut libc :: c_char , # [ doc = " pointer to the src-data" ] pub allocated : usize , # [ doc = " amount of tokens allocated result" ] pub len : usize , # [ doc = " number of tokens in result" ] pub depth : usize , } # [ test ] fn bindgen_test_layout_json_parser ( ) { assert_eq ! ( :: core :: mem :: size_of :: < json_parser > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( json_parser ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < json_parser > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( json_parser ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < json_parser > ( ) ) ) . result as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( json_parser ) , "::" , stringify ! ( result ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < json_parser > ( ) ) ) . c as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( json_parser ) , "::" , stringify ! ( c ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < json_parser > ( ) ) ) . allocated as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( json_parser ) , "::" , stringify ! ( allocated ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < json_parser > ( ) ) ) . len as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( json_parser ) , "::" , stringify ! ( len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < json_parser > ( ) ) ) . depth as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( json_parser ) , "::" , stringify ! ( depth ) ) ) ; } # [ doc = " parser for json or binary-data. it needs to freed after usage." ] pub type json_ctx_t = json_parser ; extern "C" { # [ doc = " returns the byte-representation of token." ] # [ doc = "" ] # [ doc = " In case of a number it is returned as bigendian." ] # [ doc = " booleans as 0x01 or 0x00" ] # [ doc = " and NULL as 0x." ] # [ doc = " Objects or arrays will return 0x." ] pub fn d_to_bytes ( item : * mut d_token_t ) -> bytes_t ; } extern "C" { pub fn d_bytes_to ( item : * mut d_token_t , dst : * mut u8 , max : libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn d_bytes ( item : * const d_token_t ) -> * mut bytes_t ; } extern "C" { pub fn d_bytesl ( item : * mut d_token_t , l : usize ) -> * mut bytes_t ; } extern "C" { pub fn d_string ( item : * const d_token_t ) -> * mut libc :: c_char ; } extern "C" { pub fn d_int ( item : * const d_token_t ) -> i32 ; } extern "C" { pub fn d_intd ( item : * const d_token_t , def_val : u32 ) -> i32 ; } extern "C" { pub fn d_long ( item : * const d_token_t ) -> u64 ; } extern "C" { pub fn d_longd ( item : * const d_token_t , def_val : u64 ) -> u64 ; } extern "C" { pub fn d_create_bytes_vec ( arr : * const d_token_t ) -> * mut * mut bytes_t ; } extern "C" { pub fn d_eq ( a : * const d_token_t , b : * const d_token_t ) -> bool ; } extern "C" { pub fn keyn ( c : * const libc :: c_char , len : usize ) -> d_key_t ; } extern "C" { pub fn d_get ( item : * mut d_token_t , key : u16 ) -> * mut d_token_t ; } extern "C" { pub fn d_get_or ( item : * mut d_token_t , key1 : u16 , key2 : u16 ) -> * mut d_token_t ; } extern "C" { pub fn d_get_at ( item : * mut d_token_t , index : u32 ) -> * mut d_token_t ; } extern "C" { pub fn d_next ( item : * mut d_token_t ) -> * mut d_token_t ; } extern "C" { pub fn d_serialize_binary ( bb : * mut bytes_builder_t , t : * mut d_token_t ) ; } extern "C" { pub fn parse_binary ( data : * const bytes_t ) -> * mut json_ctx_t ; } extern "C" { pub fn parse_binary_str ( data : * const libc :: c_char , len : libc :: c_int ) -> * mut json_ctx_t ; } extern "C" { pub fn parse_json ( js : * const libc :: c_char ) -> * mut json_ctx_t ; } extern "C" { pub fn json_free ( parser_ctx : * mut json_ctx_t ) ; } extern "C" { pub fn d_to_json ( item : * const d_token_t ) -> str_range_t ; } extern "C" { pub fn d_create_json ( item : * mut d_token_t ) -> * mut libc :: c_char ; } extern "C" { pub fn json_create ( ) -> * mut json_ctx_t ; } extern "C" { pub fn json_create_null ( jp : * mut json_ctx_t ) -> * mut d_token_t ; } extern "C" { pub fn json_create_bool ( jp : * mut json_ctx_t , value : bool ) -> * mut d_token_t ; } extern "C" { pub fn json_create_int ( jp : * mut json_ctx_t , value : u64 ) -> * mut d_token_t ; } extern "C" { pub fn json_create_string ( jp : * mut json_ctx_t , value : * mut libc :: c_char ) -> * mut d_token_t ; } extern "C" { pub fn json_create_bytes ( jp : * mut json_ctx_t , value : bytes_t ) -> * mut d_token_t ; } extern "C" { pub fn json_create_object ( jp : * mut json_ctx_t ) -> * mut d_token_t ; } extern "C" { pub fn json_create_array ( jp : * mut json_ctx_t ) -> * mut d_token_t ; } extern "C" { pub fn json_object_add_prop ( object : * mut d_token_t , key : d_key_t , value : * mut d_token_t ) -> * mut d_token_t ; } extern "C" { pub fn json_array_add_value ( object : * mut d_token_t , value : * mut d_token_t ) -> * mut d_token_t ; } extern "C" { pub fn d_get_keystr ( k : d_key_t ) -> * mut libc :: c_char ; } extern "C" { pub fn d_track_keynames ( v : u8 ) ; } extern "C" { pub fn d_clear_keynames ( ) ; } extern "C" { pub fn d_get_byteskl ( r : * mut d_token_t , k : d_key_t , minl : u32 ) -> * mut bytes_t ; } extern "C" { pub fn d_getl ( item : * mut d_token_t , k : u16 , minl : u32 ) -> * mut d_token_t ; } # [ doc = " iterator over elements of a array opf object." ] # [ doc = "" ] # [ doc = " usage:" ] # [ doc = " ```c" ] # [ doc = " for (d_iterator_t iter = d_iter( parent ); iter.left ; d_iter_next(&iter)) {" ] # [ doc = "   uint32_t val = d_int(iter.token);" ] # [ doc = " }" ] # [ doc = " ```" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct d_iterator { # [ doc = "< current token" ] pub token : * mut d_token_t , # [ doc = "< number of result left" ] pub left : libc :: c_int , } # [ test ] fn bindgen_test_layout_d_iterator ( ) { assert_eq ! ( :: core :: mem :: size_of :: < d_iterator > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( d_iterator ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < d_iterator > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( d_iterator ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < d_iterator > ( ) ) ) . token as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( d_iterator ) , "::" , stringify ! ( token ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < d_iterator > ( ) ) ) . left as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( d_iterator ) , "::" , stringify ! ( left ) ) ) ; } # [ doc = " iterator over elements of a array opf object." ] # [ doc = "" ] # [ doc = " usage:" ] # [ doc = " ```c" ] # [ doc = " for (d_iterator_t iter = d_iter( parent ); iter.left ; d_iter_next(&iter)) {" ] # [ doc = "   uint32_t val = d_int(iter.token);" ] # [ doc = " }" ] # [ doc = " ```" ] pub type d_iterator_t = d_iterator ; extern "C" { pub fn d_iter ( parent : * mut d_token_t ) -> d_iterator_t ; } # [ doc = " represents a single cache entry in a linked list." ] # [ doc = " These are used within a request context to cache values and automaticly free them." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct cache_entry { # [ doc = "<  an optional key of the entry" ] pub key : bytes_t , # [ doc = "< the value" ] pub value : bytes_t , # [ doc = "< the buffer is used to store extra data, which will be cleaned when freed." ] pub buffer : [ u8 ; 4usize ] , # [ doc = "< if true, the cache-entry will be freed when the request context is cleaned up." ] pub must_free : bool , # [ doc = "< pointer to the next entry." ] pub next : * mut cache_entry , } # [ test ] fn bindgen_test_layout_cache_entry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < cache_entry > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( cache_entry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < cache_entry > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( cache_entry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < cache_entry > ( ) ) ) . key as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( cache_entry ) , "::" , stringify ! ( key ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < cache_entry > ( ) ) ) . value as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( cache_entry ) , "::" , stringify ! ( value ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < cache_entry > ( ) ) ) . buffer as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( cache_entry ) , "::" , stringify ! ( buffer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < cache_entry > ( ) ) ) . must_free as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( cache_entry ) , "::" , stringify ! ( must_free ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < cache_entry > ( ) ) ) . next as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( cache_entry ) , "::" , stringify ! ( next ) ) ) ; } # [ doc = " represents a single cache entry in a linked list." ] # [ doc = " These are used within a request context to cache values and automaticly free them." ] pub type cache_entry_t = cache_entry ; extern "C" { # [ doc = " get the entry for a given key." ] pub fn in3_cache_get_entry ( cache : * mut cache_entry_t , key : * mut bytes_t ) -> * mut bytes_t ; } extern "C" { # [ doc = " adds an entry to the linked list." ] pub fn in3_cache_add_entry ( cache : * mut * mut cache_entry_t , key : bytes_t , value : bytes_t ) -> * mut cache_entry_t ; } extern "C" { # [ doc = " clears all entries in the linked list." ] pub fn in3_cache_free ( cache : * mut cache_entry_t ) ; } extern "C" { # [ doc = " converts the bytes to a unsigned long (at least the last max len bytes)" ] pub fn bytes_to_long ( data : * const u8 , len : libc :: c_int ) -> u64 ; } extern "C" { # [ doc = " converts a character into a uint64_t" ] pub fn char_to_long ( a : * const libc :: c_char , l : libc :: c_int ) -> u64 ; } extern "C" { # [ doc = "  converts a hexchar to byte (4bit)" ] pub fn hexchar_to_int ( c : libc :: c_char ) -> u8 ; } extern "C" { # [ doc = " converts a uint64_t to string (char*); buffer-size min. 21 bytes" ] pub fn u64_to_str ( value : u64 , pBuf : * mut libc :: c_char , szBuf : libc :: c_int ) -> * const libc :: c_char ; } extern "C" { # [ doc = " convert a c hex string to a byte array storing it into an existing buffer." ] # [ doc = "" ] # [ doc = " @param  hexdata: the hex string" ] # [ doc = " @param  hexlen: the len of the string to read. -1 will use strlen to determine the length." ] # [ doc = " @param  out: the byte buffer" ] # [ doc = " @param  outlen: the length of the buffer to write into" ] # [ doc = " @retval the  number of bytes written" ] pub fn hex_to_bytes ( hexdata : * const libc :: c_char , hexlen : libc :: c_int , out : * mut u8 , outlen : libc :: c_int ) -> libc :: c_int ; } extern "C" { # [ doc = " convert a c string to a byte array creating a new buffer" ] pub fn hex_to_new_bytes ( buf : * const libc :: c_char , len : libc :: c_int ) -> * mut bytes_t ; } extern "C" { # [ doc = " convefrts a bytes into hex" ] pub fn bytes_to_hex ( buffer : * const u8 , len : libc :: c_int , out : * mut libc :: c_char ) -> libc :: c_int ; } extern "C" { # [ doc = " hashes the bytes and creates a new bytes_t" ] pub fn sha3 ( data : * const bytes_t ) -> * mut bytes_t ; } extern "C" { # [ doc = " writes 32 bytes to the pointer." ] pub fn sha3_to ( data : * mut bytes_t , dst : * mut libc :: c_void ) -> libc :: c_int ; } extern "C" { # [ doc = " converts a long to 8 bytes" ] pub fn long_to_bytes ( val : u64 , dst : * mut u8 ) ; } extern "C" { # [ doc = " converts a int to 4 bytes" ] pub fn int_to_bytes ( val : u32 , dst : * mut u8 ) ; } extern "C" { # [ doc = " duplicate the string" ] pub fn _strdupn ( src : * const libc :: c_char , len : libc :: c_int ) -> * mut libc :: c_char ; } extern "C" { # [ doc = " calculate the min number of byte to represents the len" ] pub fn min_bytes_len ( val : u64 ) -> libc :: c_int ; } extern "C" { # [ doc = " sets a variable value to 32byte word." ] pub fn uint256_set ( src : * const u8 , src_len : wlen_t , dst : * mut u8 ) ; } extern "C" { # [ doc = " replaces a string and returns a copy." ] # [ doc = " @retval" ] pub fn str_replace ( orig : * mut libc :: c_char , rep : * const libc :: c_char , with : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { # [ doc = " replaces a string at the given position." ] pub fn str_replace_pos ( orig : * mut libc :: c_char , pos : usize , len : usize , rep : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { # [ doc = " lightweight strstr() replacements" ] pub fn str_find ( haystack : * mut libc :: c_char , needle : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { # [ doc = " remove all html-tags in the text." ] pub fn str_remove_html ( data : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { # [ doc = " current timestamp in ms." ] pub fn current_ms ( ) -> u64 ; } # [ doc = " time function" ] # [ doc = " defaults to k_uptime_get() for zeohyr and time(NULL) for other platforms" ] # [ doc = " expected to return a u64 value representative of time (from epoch/start)" ] pub type time_func = :: core :: option :: Option < unsafe extern "C" fn ( t : * mut libc :: c_void ) -> u64 > ; extern "C" { pub fn in3_set_func_time ( fn_ : time_func ) ; } extern "C" { pub fn in3_time ( t : * mut libc :: c_void ) -> u64 ; } # [ doc = " rand function" ] # [ doc = " defaults to k_uptime_get() for zeohyr and rand() for other platforms" ] # [ doc = " expected to return a random number" ] pub type rand_func = :: core :: option :: Option < unsafe extern "C" fn ( s : * mut libc :: c_void ) -> libc :: c_int > ; extern "C" { pub fn in3_set_func_rand ( fn_ : rand_func ) ; } extern "C" { pub fn in3_rand ( s : * mut libc :: c_void ) -> libc :: c_int ; } # [ doc = " srand function" ] # [ doc = " defaults to NOOP for zephyr and srand() for other platforms" ] # [ doc = " expected to set the seed for a new sequence of random numbers to be returned by in3_rand()" ] pub type srand_func = :: core :: option :: Option < unsafe extern "C" fn ( s : libc :: c_uint ) > ; extern "C" { pub fn in3_set_func_srand ( fn_ : srand_func ) ; } extern "C" { pub fn in3_srand ( s : libc :: c_uint ) ; } pub mod in3_ret_t { # [ doc = " ERROR types  used as return values." ] # [ doc = "" ] # [ doc = " All values (except IN3_OK) indicate an error." ] # [ doc = " IN3_WAITING may be treated like an error, since we have stop executing until the response has arrived, but it is a valid return value." ] pub type Type = i32 ; # [ doc = "< Success" ] pub const IN3_OK : Type = 0 ; # [ doc = "< Unknown error - usually accompanied with specific error msg" ] pub const IN3_EUNKNOWN : Type = -1 ; # [ doc = "< No memory" ] pub const IN3_ENOMEM : Type = -2 ; # [ doc = "< Not supported" ] pub const IN3_ENOTSUP : Type = -3 ; # [ doc = "< Invalid value" ] pub const IN3_EINVAL : Type = -4 ; # [ doc = "< Not found" ] pub const IN3_EFIND : Type = -5 ; # [ doc = "< Invalid config" ] pub const IN3_ECONFIG : Type = -6 ; # [ doc = "< Limit reached" ] pub const IN3_ELIMIT : Type = -7 ; # [ doc = "< Version mismatch" ] pub const IN3_EVERS : Type = -8 ; # [ doc = "< Data invalid, eg. invalid/incomplete JSON" ] pub const IN3_EINVALDT : Type = -9 ; # [ doc = "< Wrong password" ] pub const IN3_EPASS : Type = -10 ; # [ doc = "< RPC error (i.e. in3_ctx_t::error set)" ] pub const IN3_ERPC : Type = -11 ; # [ doc = "< RPC no response" ] pub const IN3_ERPCNRES : Type = -12 ; # [ doc = "< USN URL parse error" ] pub const IN3_EUSNURL : Type = -13 ; # [ doc = "< Transport error" ] pub const IN3_ETRANS : Type = -14 ; # [ doc = "< Not in range" ] pub const IN3_ERANGE : Type = -15 ; # [ doc = "< the process can not be finished since we are waiting for responses" ] pub const IN3_WAITING : Type = -16 ; # [ doc = "< Ignorable error" ] pub const IN3_EIGNORE : Type = -17 ; # [ doc = "< payment required" ] pub const IN3_EPAYMENT_REQUIRED : Type = -18 ; # [ doc = "< harware wallet device not connected" ] pub const IN3_ENODEVICE : Type = -19 ; } extern "C" { # [ doc = " converts a error code into a string." ] # [ doc = " These strings are constants and do not need to be freed." ] pub fn in3_errmsg ( err : in3_ret_t :: Type ) -> * mut libc :: c_char ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tm { pub tm_sec : libc :: c_int , pub tm_min : libc :: c_int , pub tm_hour : libc :: c_int , pub tm_mday : libc :: c_int , pub tm_mon : libc :: c_int , pub tm_year : libc :: c_int , pub tm_wday : libc :: c_int , pub tm_yday : libc :: c_int , pub tm_isdst : libc :: c_int , pub tm_gmtoff : libc :: c_long , pub tm_zone : * const libc :: c_char , } # [ test ] fn bindgen_test_layout_tm ( ) { assert_eq ! ( :: core :: mem :: size_of :: < tm > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( tm ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < tm > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( tm ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < tm > ( ) ) ) . tm_sec as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_sec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < tm > ( ) ) ) . tm_min as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_min ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < tm > ( ) ) ) . tm_hour as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_hour ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < tm > ( ) ) ) . tm_mday as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_mday ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < tm > ( ) ) ) . tm_mon as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_mon ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < tm > ( ) ) ) . tm_year as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_year ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < tm > ( ) ) ) . tm_wday as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_wday ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < tm > ( ) ) ) . tm_yday as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_yday ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < tm > ( ) ) ) . tm_isdst as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_isdst ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < tm > ( ) ) ) . tm_gmtoff as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_gmtoff ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < tm > ( ) ) ) . tm_zone as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_zone ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct itimerspec { pub it_interval : timespec , pub it_value : timespec , } # [ test ] fn bindgen_test_layout_itimerspec ( ) { assert_eq ! ( :: core :: mem :: size_of :: < itimerspec > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( itimerspec ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < itimerspec > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( itimerspec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < itimerspec > ( ) ) ) . it_interval as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( itimerspec ) , "::" , stringify ! ( it_interval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < itimerspec > ( ) ) ) . it_value as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( itimerspec ) , "::" , stringify ! ( it_value ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sigevent { _unused : [ u8 ; 0 ] , } extern "C" { pub fn clock ( ) -> clock_t ; } extern "C" { pub fn time ( __timer : * mut time_t ) -> time_t ; } extern "C" { pub fn difftime ( __time1 : time_t , __time0 : time_t ) -> f64 ; } extern "C" { pub fn mktime ( __tp : * mut tm ) -> time_t ; } extern "C" { pub fn strftime ( __s : * mut libc :: c_char , __maxsize : usize , __format : * const libc :: c_char , __tp : * const tm ) -> usize ; } extern "C" { pub fn strftime_l ( __s : * mut libc :: c_char , __maxsize : usize , __format : * const libc :: c_char , __tp : * const tm , __loc : locale_t ) -> usize ; } extern "C" { pub fn gmtime ( __timer : * const time_t ) -> * mut tm ; } extern "C" { pub fn localtime ( __timer : * const time_t ) -> * mut tm ; } extern "C" { pub fn gmtime_r ( __timer : * const time_t , __tp : * mut tm ) -> * mut tm ; } extern "C" { pub fn localtime_r ( __timer : * const time_t , __tp : * mut tm ) -> * mut tm ; } extern "C" { pub fn asctime ( __tp : * const tm ) -> * mut libc :: c_char ; } extern "C" { pub fn ctime ( __timer : * const time_t ) -> * mut libc :: c_char ; } extern "C" { pub fn asctime_r ( __tp : * const tm , __buf : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn ctime_r ( __timer : * const time_t , __buf : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub static mut __tzname : [ * mut libc :: c_char ; 2usize ] ; } extern "C" { pub static mut __daylight : libc :: c_int ; } extern "C" { pub static mut __timezone : libc :: c_long ; } extern "C" { pub static mut tzname : [ * mut libc :: c_char ; 2usize ] ; } extern "C" { pub fn tzset ( ) ; } extern "C" { pub static mut daylight : libc :: c_int ; } extern "C" { pub static mut timezone : libc :: c_long ; } extern "C" { pub fn timegm ( __tp : * mut tm ) -> time_t ; } extern "C" { pub fn timelocal ( __tp : * mut tm ) -> time_t ; } extern "C" { pub fn dysize ( __year : libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn nanosleep ( __requested_time : * const timespec , __remaining : * mut timespec ) -> libc :: c_int ; } extern "C" { pub fn clock_getres ( __clock_id : clockid_t , __res : * mut timespec ) -> libc :: c_int ; } extern "C" { pub fn clock_gettime ( __clock_id : clockid_t , __tp : * mut timespec ) -> libc :: c_int ; } extern "C" { pub fn clock_settime ( __clock_id : clockid_t , __tp : * const timespec ) -> libc :: c_int ; } extern "C" { pub fn clock_nanosleep ( __clock_id : clockid_t , __flags : libc :: c_int , __req : * const timespec , __rem : * mut timespec ) -> libc :: c_int ; } extern "C" { pub fn clock_getcpuclockid ( __pid : pid_t , __clock_id : * mut clockid_t ) -> libc :: c_int ; } extern "C" { pub fn timer_create ( __clock_id : clockid_t , __evp : * mut sigevent , __timerid : * mut timer_t ) -> libc :: c_int ; } extern "C" { pub fn timer_delete ( __timerid : timer_t ) -> libc :: c_int ; } extern "C" { pub fn timer_settime ( __timerid : timer_t , __flags : libc :: c_int , __value : * const itimerspec , __ovalue : * mut itimerspec ) -> libc :: c_int ; } extern "C" { pub fn timer_gettime ( __timerid : timer_t , __value : * mut itimerspec ) -> libc :: c_int ; } extern "C" { pub fn timer_getoverrun ( __timerid : timer_t ) -> libc :: c_int ; } extern "C" { pub fn timespec_get ( __ts : * mut timespec , __base : libc :: c_int ) -> libc :: c_int ; } # [ doc = " type for a chain_id." ] pub type chain_id_t = u32 ; # [ repr ( u32 ) ] # [ doc = " the type of the chain." ] # [ doc = "" ] # [ doc = " for incubed a chain can be any distributed network or database with incubed support." ] # [ doc = " Depending on this chain-type the previously registered verifyer will be choosen and used." ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum in3_chain_type_t { # [ doc = "< Ethereum chain" ] CHAIN_ETH = 0 , # [ doc = "< substrate chain" ] CHAIN_SUBSTRATE = 1 , # [ doc = "< ipfs verifiaction" ] CHAIN_IPFS = 2 , # [ doc = "< Bitcoin chain" ] CHAIN_BTC = 3 , # [ doc = "< EOS chain" ] CHAIN_EOS = 4 , # [ doc = "< IOTA chain" ] CHAIN_IOTA = 5 , # [ doc = "< other chains" ] CHAIN_GENERIC = 6 , } # [ repr ( u32 ) ] # [ doc = " the type of proof." ] # [ doc = "" ] # [ doc = " Depending on the proof-type different levels of proof will be requested from the node." ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum in3_proof_t { # [ doc = "< No Verification" ] PROOF_NONE = 0 , # [ doc = "< Standard Verification of the important properties" ] PROOF_STANDARD = 1 , # [ doc = "< All field will be validated including uncles" ] PROOF_FULL = 2 , } # [ repr ( u32 ) ] # [ doc = " verification as delivered by the server." ] # [ doc = "" ] # [ doc = " This will be part of the in3-request and will be generated based on the prooftype." ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum in3_verification_t { # [ doc = "< No Verifacation" ] VERIFICATION_NEVER = 0 , # [ doc = "< Includes the proof of the data" ] VERIFICATION_PROOF = 1 , } # [ doc = " the configuration as part of each incubed request." ] # [ doc = " This will be generated for each request based on the client-configuration. the verifier may access this during verification in order to check against the request." ] # [ doc = "" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_request_config { # [ doc = "< the chain to be used. this is holding the integer-value of the hexstring." ] pub chain_id : chain_id_t , # [ doc = "< the current flags from the client." ] pub flags : uint_fast8_t , # [ doc = "< this flaqg is set, if the proof is set to \"PROOF_FULL\"" ] pub use_full_proof : u8 , # [ doc = "< a list of blockhashes already verified. The Server will not send any proof for them again ." ] pub verified_hashes : * mut bytes_t , # [ doc = "< number of verified blockhashes" ] pub verified_hashes_length : u16 , # [ doc = "< the last blocknumber the nodelistz changed" ] pub latest_block : u8 , # [ doc = "< number of signatures( in percent) needed in order to reach finality." ] pub finality : u16 , # [ doc = "< Verification-type" ] pub verification : in3_verification_t , # [ doc = "< the addresses of servers requested to sign the blockhash" ] pub signers : * mut bytes_t , # [ doc = "< number or addresses" ] pub signers_length : u8 , # [ doc = "< meassured times in ms for the request" ] pub times : * mut u32 , } # [ test ] fn bindgen_test_layout_in3_request_config ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_request_config > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( in3_request_config ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_request_config > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_request_config ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request_config > ( ) ) ) . chain_id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_request_config ) , "::" , stringify ! ( chain_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request_config > ( ) ) ) . flags as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( in3_request_config ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request_config > ( ) ) ) . use_full_proof as * const _ as usize } , 5usize , concat ! ( "Offset of field: " , stringify ! ( in3_request_config ) , "::" , stringify ! ( use_full_proof ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request_config > ( ) ) ) . verified_hashes as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in3_request_config ) , "::" , stringify ! ( verified_hashes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request_config > ( ) ) ) . verified_hashes_length as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( in3_request_config ) , "::" , stringify ! ( verified_hashes_length ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request_config > ( ) ) ) . latest_block as * const _ as usize } , 18usize , concat ! ( "Offset of field: " , stringify ! ( in3_request_config ) , "::" , stringify ! ( latest_block ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request_config > ( ) ) ) . finality as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( in3_request_config ) , "::" , stringify ! ( finality ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request_config > ( ) ) ) . verification as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( in3_request_config ) , "::" , stringify ! ( verification ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request_config > ( ) ) ) . signers as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( in3_request_config ) , "::" , stringify ! ( signers ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request_config > ( ) ) ) . signers_length as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( in3_request_config ) , "::" , stringify ! ( signers_length ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request_config > ( ) ) ) . times as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( in3_request_config ) , "::" , stringify ! ( times ) ) ) ; } # [ doc = " the configuration as part of each incubed request." ] # [ doc = " This will be generated for each request based on the client-configuration. the verifier may access this during verification in order to check against the request." ] # [ doc = "" ] pub type in3_request_config_t = in3_request_config ; # [ doc = " Node capabilities" ] # [ doc = " @note Always access using getters/setters in nodelist.h" ] pub type in3_node_props_t = u64 ; # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum in3_node_props_type_t { # [ doc = "< filter out nodes which are providing no proof" ] NODE_PROP_PROOF = 1 , # [ doc = "< filter out nodes other then which have capability of the same RPC endpoint may also accept requests for different chains" ] NODE_PROP_MULTICHAIN = 2 , # [ doc = "< filter out non-archive supporting nodes" ] NODE_PROP_ARCHIVE = 4 , # [ doc = "< filter out non-http nodes" ] NODE_PROP_HTTP = 8 , # [ doc = "< filter out nodes that don't support binary encoding" ] NODE_PROP_BINARY = 16 , # [ doc = "< filter out non-onion nodes" ] NODE_PROP_ONION = 32 , # [ doc = "< filter out non-signer nodes" ] NODE_PROP_SIGNER = 64 , # [ doc = "< filter out non-data provider nodes" ] NODE_PROP_DATA = 128 , # [ doc = "< filter out nodes that do not provide stats" ] NODE_PROP_STATS = 256 , # [ doc = "< filter out nodes that will sign blocks with lower min block height than specified" ] NODE_PROP_MIN_BLOCK_HEIGHT = 1024 , } # [ repr ( u32 ) ] # [ doc = " a list of flags definiing the behavior of the incubed client. They should be used as bitmask for the flags-property." ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum in3_flags_type_t { # [ doc = "< the in3-section with the proof will also returned" ] FLAGS_KEEP_IN3 = 1 , # [ doc = "< the nodelist will be automaticly updated if the last_block is newer" ] FLAGS_AUTO_UPDATE_LIST = 2 , # [ doc = "< the code is included when sending eth_call-requests" ] FLAGS_INCLUDE_CODE = 4 , # [ doc = "< the client will use binary format" ] FLAGS_BINARY = 8 , # [ doc = "< the client will try to use http instead of https" ] FLAGS_HTTP = 16 , # [ doc = "< nodes will keep track of the stats (default=true)" ] FLAGS_STATS = 32 , # [ doc = "< nodelist update request will not automatically ask for signatures and proof" ] FLAGS_NODE_LIST_NO_SIG = 64 , } # [ repr ( u32 ) ] # [ doc = " a list of node attributes (mostly used internally)" ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum in3_node_attr_type_t { # [ doc = "< indicates if node exists in whiteList" ] ATTR_WHITELISTED = 1 , # [ doc = "< used to avoid filtering manually added nodes before first nodeList update" ] ATTR_BOOT_NODE = 2 , } pub type in3_node_attr_t = u8 ; # [ doc = " incubed node-configuration." ] # [ doc = "" ] # [ doc = " These information are read from the Registry contract and stored in this struct representing a server or node." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_node { # [ doc = "< address of the server" ] pub address : * mut bytes_t , # [ doc = "< the deposit stored in the registry contract, which this would lose if it sends a wrong blockhash" ] pub deposit : u64 , # [ doc = "< index within the nodelist, also used in the contract as key" ] pub index : u32 , # [ doc = "< the maximal capacity able to handle" ] pub capacity : u32 , # [ doc = "< used to identify the capabilities of the node. See in3_node_props_type_t in nodelist.h" ] pub props : in3_node_props_t , # [ doc = "< the url of the node" ] pub url : * mut libc :: c_char , # [ doc = "< bitmask of internal attributes" ] pub attrs : u8 , } # [ test ] fn bindgen_test_layout_in3_node ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_node > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( in3_node ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_node > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_node ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_node > ( ) ) ) . address as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_node ) , "::" , stringify ! ( address ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_node > ( ) ) ) . deposit as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in3_node ) , "::" , stringify ! ( deposit ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_node > ( ) ) ) . index as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( in3_node ) , "::" , stringify ! ( index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_node > ( ) ) ) . capacity as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( in3_node ) , "::" , stringify ! ( capacity ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_node > ( ) ) ) . props as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( in3_node ) , "::" , stringify ! ( props ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_node > ( ) ) ) . url as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( in3_node ) , "::" , stringify ! ( url ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_node > ( ) ) ) . attrs as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( in3_node ) , "::" , stringify ! ( attrs ) ) ) ; } # [ doc = " incubed node-configuration." ] # [ doc = "" ] # [ doc = " These information are read from the Registry contract and stored in this struct representing a server or node." ] pub type in3_node_t = in3_node ; # [ doc = " Weight or reputation of a node." ] # [ doc = "" ] # [ doc = " Based on the past performance of the node a weight is calculated given faster nodes a higher weight" ] # [ doc = " and chance when selecting the next node from the nodelist." ] # [ doc = " These weights will also be stored in the cache (if available)" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_node_weight { # [ doc = "< counter for responses" ] pub response_count : u32 , # [ doc = "< total of all response times" ] pub total_response_time : u32 , # [ doc = "< if >0 this node is blacklisted until k. k is a unix timestamp" ] pub blacklisted_until : u64 , } # [ test ] fn bindgen_test_layout_in3_node_weight ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_node_weight > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( in3_node_weight ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_node_weight > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_node_weight ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_node_weight > ( ) ) ) . response_count as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_node_weight ) , "::" , stringify ! ( response_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_node_weight > ( ) ) ) . total_response_time as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( in3_node_weight ) , "::" , stringify ! ( total_response_time ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_node_weight > ( ) ) ) . blacklisted_until as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in3_node_weight ) , "::" , stringify ! ( blacklisted_until ) ) ) ; } # [ doc = " Weight or reputation of a node." ] # [ doc = "" ] # [ doc = " Based on the past performance of the node a weight is calculated given faster nodes a higher weight" ] # [ doc = " and chance when selecting the next node from the nodelist." ] # [ doc = " These weights will also be stored in the cache (if available)" ] pub type in3_node_weight_t = in3_node_weight ; extern "C" { # [ doc = " setter method for interacting with in3_node_props_t." ] pub fn in3_node_props_set ( node_props : * mut in3_node_props_t , type_ : in3_node_props_type_t , value : u8 ) ; } # [ doc = " defines a whitelist structure used for the nodelist." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_whitelist { # [ doc = "< address of whiteList contract. If specified, whiteList is always auto-updated and manual whiteList is overridden" ] pub contract : address_t , # [ doc = "< serialized list of node addresses that constitute the whiteList" ] pub addresses : bytes_t , # [ doc = "< last blocknumber the whiteList was updated, which is used to detect changed in the whitelist" ] pub last_block : u64 , # [ doc = "< if true the nodelist should be updated and will trigger a `in3_nodeList`-request before the next request is send." ] pub needs_update : bool , } # [ test ] fn bindgen_test_layout_in3_whitelist ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_whitelist > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( in3_whitelist ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_whitelist > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_whitelist ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_whitelist > ( ) ) ) . contract as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_whitelist ) , "::" , stringify ! ( contract ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_whitelist > ( ) ) ) . addresses as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( in3_whitelist ) , "::" , stringify ! ( addresses ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_whitelist > ( ) ) ) . last_block as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( in3_whitelist ) , "::" , stringify ! ( last_block ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_whitelist > ( ) ) ) . needs_update as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( in3_whitelist ) , "::" , stringify ! ( needs_update ) ) ) ; } # [ doc = " defines a whitelist structure used for the nodelist." ] pub type in3_whitelist_t = in3_whitelist ; # [ doc = " represents a blockhash which was previously verified" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_verified_hash { # [ doc = "< the number of the block" ] pub block_number : u64 , # [ doc = "< the blockhash" ] pub hash : bytes32_t , } # [ test ] fn bindgen_test_layout_in3_verified_hash ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_verified_hash > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( in3_verified_hash ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_verified_hash > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_verified_hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_verified_hash > ( ) ) ) . block_number as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_verified_hash ) , "::" , stringify ! ( block_number ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_verified_hash > ( ) ) ) . hash as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in3_verified_hash ) , "::" , stringify ! ( hash ) ) ) ; } # [ doc = " represents a blockhash which was previously verified" ] pub type in3_verified_hash_t = in3_verified_hash ; # [ doc = " Chain definition inside incubed." ] # [ doc = "" ] # [ doc = " for incubed a chain can be any distributed network or database with incubed support." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_chain { # [ doc = "< chain_id, which could be a free or based on the public ethereum networkId" ] pub chain_id : chain_id_t , # [ doc = "< chaintype" ] pub type_ : in3_chain_type_t , # [ doc = "< last blocknumber the nodeList was updated, which is used to detect changed in the nodelist" ] pub last_block : u64 , # [ doc = "< number of nodes in the nodeList" ] pub nodelist_length : libc :: c_int , # [ doc = "< array of nodes" ] pub nodelist : * mut in3_node_t , # [ doc = "< stats and weights recorded for each node" ] pub weights : * mut in3_node_weight_t , # [ doc = "< array of addresses of nodes that should always part of the nodeList" ] pub init_addresses : * mut * mut bytes_t , # [ doc = "< the address of the registry contract" ] pub contract : * mut bytes_t , # [ doc = "< the identifier of the registry" ] pub registry_id : bytes32_t , # [ doc = "< version of the chain" ] pub version : u8 , # [ doc = "< contains the list of already verified blockhashes" ] pub verified_hashes : * mut in3_verified_hash_t , # [ doc = "< if set the whitelist of the addresses." ] pub whitelist : * mut in3_whitelist_t , # [ doc = "< average block time (seconds) for this chain (calculated internally)" ] pub avg_block_time : u16 , # [ doc = "< this configuration will be set by the verifiers and allow to add special structs here." ] pub conf : * mut libc :: c_void , pub nodelist_upd8_params : * mut in3_chain__bindgen_ty_1 , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_chain__bindgen_ty_1 { # [ doc = "< node that reported the last_block which necessitated a nodeList update" ] pub node : address_t , # [ doc = "< the last_block when the nodelist last changed reported by this node" ] pub exp_last_block : u64 , # [ doc = "< approx. time when nodelist must be updated (i.e. when reported last_block will be considered final)" ] pub timestamp : u64 , } # [ test ] fn bindgen_test_layout_in3_chain__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_chain__bindgen_ty_1 > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( in3_chain__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_chain__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_chain__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain__bindgen_ty_1 > ( ) ) ) . node as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain__bindgen_ty_1 ) , "::" , stringify ! ( node ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain__bindgen_ty_1 > ( ) ) ) . exp_last_block as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain__bindgen_ty_1 ) , "::" , stringify ! ( exp_last_block ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain__bindgen_ty_1 > ( ) ) ) . timestamp as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain__bindgen_ty_1 ) , "::" , stringify ! ( timestamp ) ) ) ; } # [ test ] fn bindgen_test_layout_in3_chain ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_chain > ( ) , 136usize , concat ! ( "Size of: " , stringify ! ( in3_chain ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_chain > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_chain ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . chain_id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( chain_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . type_ as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . last_block as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( last_block ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . nodelist_length as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( nodelist_length ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . nodelist as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( nodelist ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . weights as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( weights ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . init_addresses as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( init_addresses ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . contract as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( contract ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . registry_id as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( registry_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . version as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . verified_hashes as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( verified_hashes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . whitelist as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( whitelist ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . avg_block_time as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( avg_block_time ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . conf as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( conf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_chain > ( ) ) ) . nodelist_upd8_params as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( in3_chain ) , "::" , stringify ! ( nodelist_upd8_params ) ) ) ; } # [ doc = " Chain definition inside incubed." ] # [ doc = "" ] # [ doc = " for incubed a chain can be any distributed network or database with incubed support." ] pub type in3_chain_t = in3_chain ; # [ doc = " storage handler function for reading from cache." ] # [ doc = " @returns the found result. if the key is found this function should return the values as bytes otherwise `NULL`." ] pub type in3_storage_get_item = :: core :: option :: Option < unsafe extern "C" fn ( cptr : * mut libc :: c_void , key : * const libc :: c_char ) -> * mut bytes_t > ; # [ doc = " storage handler function for writing to the cache." ] pub type in3_storage_set_item = :: core :: option :: Option < unsafe extern "C" fn ( cptr : * mut libc :: c_void , key : * const libc :: c_char , value : * mut bytes_t ) > ; # [ doc = " storage handler function for clearing the cache." ] pub type in3_storage_clear = :: core :: option :: Option < unsafe extern "C" fn ( cptr : * mut libc :: c_void ) > ; # [ doc = " storage handler to handle cache." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_storage_handler { # [ doc = "< function pointer returning a stored value for the given key." ] pub get_item : in3_storage_get_item , # [ doc = "< function pointer setting a stored value for the given key." ] pub set_item : in3_storage_set_item , # [ doc = "< function pointer clearing all contents of cache." ] pub clear : in3_storage_clear , # [ doc = "< custom pointer which will be passed to functions" ] pub cptr : * mut libc :: c_void , } # [ test ] fn bindgen_test_layout_in3_storage_handler ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_storage_handler > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( in3_storage_handler ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_storage_handler > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_storage_handler ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_storage_handler > ( ) ) ) . get_item as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_storage_handler ) , "::" , stringify ! ( get_item ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_storage_handler > ( ) ) ) . set_item as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in3_storage_handler ) , "::" , stringify ! ( set_item ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_storage_handler > ( ) ) ) . clear as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( in3_storage_handler ) , "::" , stringify ! ( clear ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_storage_handler > ( ) ) ) . cptr as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( in3_storage_handler ) , "::" , stringify ! ( cptr ) ) ) ; } # [ doc = " storage handler to handle cache." ] pub type in3_storage_handler_t = in3_storage_handler ; # [ repr ( u32 ) ] # [ doc = " type of the requested signature" ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum d_signature_type_t { # [ doc = "< sign the data directly" ] SIGN_EC_RAW = 0 , # [ doc = "< hash and sign the data" ] SIGN_EC_HASH = 1 , } # [ doc = " signing function." ] # [ doc = "" ] # [ doc = " signs the given data and write the signature to dst." ] # [ doc = " the return value must be the number of bytes written to dst." ] # [ doc = " In case of an error a negativ value must be returned. It should be one of the IN3_SIGN_ERR... values." ] pub type in3_sign = :: core :: option :: Option < unsafe extern "C" fn ( ctx : * mut libc :: c_void , type_ : d_signature_type_t , message : bytes_t , account : bytes_t , dst : * mut u8 ) -> in3_ret_t :: Type > ; # [ doc = " transform transaction function." ] # [ doc = "" ] # [ doc = " for multisigs, we need to change the transaction to gro through the ms." ] # [ doc = " if the new_tx is not set within the function, it will use the old_tx." ] pub type in3_prepare_tx = :: core :: option :: Option < unsafe extern "C" fn ( ctx : * mut libc :: c_void , old_tx : * mut d_token_t , new_tx : * mut * mut json_ctx_t ) -> in3_ret_t :: Type > ; # [ doc = " definition of a signer holding funciton-pointers and data." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_signer { # [ doc = "< function pointer returning a stored value for the given key." ] pub sign : in3_sign , # [ doc = "< function pointer returning capable of manipulating the transaction before signing it. This is needed in order to support multisigs." ] pub prepare_tx : in3_prepare_tx , # [ doc = "< custom object whill will be passed to functions" ] pub wallet : * mut libc :: c_void , } # [ test ] fn bindgen_test_layout_in3_signer ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_signer > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( in3_signer ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_signer > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_signer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_signer > ( ) ) ) . sign as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_signer ) , "::" , stringify ! ( sign ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_signer > ( ) ) ) . prepare_tx as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in3_signer ) , "::" , stringify ! ( prepare_tx ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_signer > ( ) ) ) . wallet as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( in3_signer ) , "::" , stringify ! ( wallet ) ) ) ; } # [ doc = " definition of a signer holding funciton-pointers and data." ] pub type in3_signer_t = in3_signer ; # [ doc = " payment prepearation function." ] # [ doc = "" ] # [ doc = " allows the payment to handle things before the request will be send." ] pub type in3_pay_prepare = :: core :: option :: Option < unsafe extern "C" fn ( ctx : * mut libc :: c_void , cptr : * mut libc :: c_void ) -> in3_ret_t :: Type > ; # [ doc = " called after receiving a parseable response with a in3-section." ] pub type in3_pay_follow_up = :: core :: option :: Option < unsafe extern "C" fn ( ctx : * mut libc :: c_void , node : * mut libc :: c_void , in3 : * mut d_token_t , error : * mut d_token_t , cptr : * mut libc :: c_void ) -> in3_ret_t :: Type > ; # [ doc = " free function for the custom pointer." ] pub type in3_pay_free = :: core :: option :: Option < unsafe extern "C" fn ( cptr : * mut libc :: c_void ) > ; # [ doc = " handles the request." ] # [ doc = "" ] # [ doc = " this function is called when the in3-section of payload of the request is built and allows the handler to add properties." ] pub type in3_pay_handle_request = :: core :: option :: Option < unsafe extern "C" fn ( ctx : * mut libc :: c_void , sb : * mut sb_t , rc : * mut in3_request_config_t , cptr : * mut libc :: c_void ) -> in3_ret_t :: Type > ; # [ doc = " the payment handler." ] # [ doc = "" ] # [ doc = " if a payment handler is set it will be used when generating the request." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_pay { # [ doc = "< payment prepearation function." ] pub prepare : in3_pay_prepare , # [ doc = "< payment function to be called after the request." ] pub follow_up : in3_pay_follow_up , # [ doc = "< this function is called when the in3-section of payload of the request is built and allows the handler to add properties. ." ] pub handle_request : in3_pay_handle_request , # [ doc = "< frees the custom pointer (cptr)." ] pub free : in3_pay_free , # [ doc = "< custom object whill will be passed to functions" ] pub cptr : * mut libc :: c_void , } # [ test ] fn bindgen_test_layout_in3_pay ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_pay > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( in3_pay ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_pay > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_pay ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_pay > ( ) ) ) . prepare as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_pay ) , "::" , stringify ! ( prepare ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_pay > ( ) ) ) . follow_up as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in3_pay ) , "::" , stringify ! ( follow_up ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_pay > ( ) ) ) . handle_request as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( in3_pay ) , "::" , stringify ! ( handle_request ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_pay > ( ) ) ) . free as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( in3_pay ) , "::" , stringify ! ( free ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_pay > ( ) ) ) . cptr as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( in3_pay ) , "::" , stringify ! ( cptr ) ) ) ; } # [ doc = " the payment handler." ] # [ doc = "" ] # [ doc = " if a payment handler is set it will be used when generating the request." ] pub type in3_pay_t = in3_pay ; # [ doc = " response-object." ] # [ doc = "" ] # [ doc = " if the error has a length>0 the response will be rejected" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_response { # [ doc = "< a stringbuilder to add any errors!" ] pub error : sb_t , # [ doc = "< a stringbuilder to add the result" ] pub result : sb_t , } # [ test ] fn bindgen_test_layout_in3_response ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_response > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( in3_response ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_response > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_response ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_response > ( ) ) ) . error as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_response ) , "::" , stringify ! ( error ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_response > ( ) ) ) . result as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( in3_response ) , "::" , stringify ! ( result ) ) ) ; } # [ doc = " response-object." ] # [ doc = "" ] # [ doc = " if the error has a length>0 the response will be rejected" ] pub type in3_response_t = in3_response ; # [ doc = " Incubed Configuration." ] # [ doc = "" ] # [ doc = " This struct holds the configuration and also point to internal resources such as filters or chain configs." ] # [ doc = "" ] pub type in3_t = in3_t_ ; # [ doc = " request-object." ] # [ doc = "" ] # [ doc = " represents a RPC-request" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_request { # [ doc = "< the payload to send" ] pub payload : * mut libc :: c_char , # [ doc = "< array of urls" ] pub urls : * mut * mut libc :: c_char , # [ doc = "< number of urls" ] pub urls_len : libc :: c_int , # [ doc = "< the responses" ] pub results : * mut in3_response_t , # [ doc = "< the timeout 0= no timeout" ] pub timeout : u32 , # [ doc = "< measured times (in ms) which will be used for ajusting the weights" ] pub times : * mut u32 , # [ doc = "< pointer to associated IN3 instance" ] pub in3 : * mut in3_t , } # [ test ] fn bindgen_test_layout_in3_request ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_request > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( in3_request ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_request > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_request ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request > ( ) ) ) . payload as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_request ) , "::" , stringify ! ( payload ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request > ( ) ) ) . urls as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in3_request ) , "::" , stringify ! ( urls ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request > ( ) ) ) . urls_len as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( in3_request ) , "::" , stringify ! ( urls_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request > ( ) ) ) . results as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( in3_request ) , "::" , stringify ! ( results ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request > ( ) ) ) . timeout as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( in3_request ) , "::" , stringify ! ( timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request > ( ) ) ) . times as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( in3_request ) , "::" , stringify ! ( times ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_request > ( ) ) ) . in3 as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( in3_request ) , "::" , stringify ! ( in3 ) ) ) ; } # [ doc = " request-object." ] # [ doc = "" ] # [ doc = " represents a RPC-request" ] pub type in3_request_t = in3_request ; # [ doc = " the transport function to be implemented by the transport provider." ] pub type in3_transport_send = :: core :: option :: Option < unsafe extern "C" fn ( request : * mut in3_request_t ) -> in3_ret_t :: Type > ; # [ repr ( u32 ) ] # [ doc = " Filter type used internally when managing filters." ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum in3_filter_type_t { # [ doc = "< Event filter" ] FILTER_EVENT = 0 , # [ doc = "< Block filter" ] FILTER_BLOCK = 1 , # [ doc = "< Pending filter (Unsupported)" ] FILTER_PENDING = 2 , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_filter_t_ { # [ doc = "< filter type: (event, block or pending)" ] pub type_ : in3_filter_type_t , # [ doc = "< associated filter options" ] pub options : * mut libc :: c_char , # [ doc = "< block no. when filter was created OR eth_getFilterChanges was called" ] pub last_block : u64 , # [ doc = "< if true the filter was not used previously" ] pub is_first_usage : bool , # [ doc = "< method to release owned resources" ] pub release : :: core :: option :: Option < unsafe extern "C" fn ( f : * mut in3_filter_t_ ) > , } # [ test ] fn bindgen_test_layout_in3_filter_t_ ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_filter_t_ > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( in3_filter_t_ ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_filter_t_ > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_filter_t_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_filter_t_ > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_filter_t_ ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_filter_t_ > ( ) ) ) . options as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in3_filter_t_ ) , "::" , stringify ! ( options ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_filter_t_ > ( ) ) ) . last_block as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( in3_filter_t_ ) , "::" , stringify ! ( last_block ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_filter_t_ > ( ) ) ) . is_first_usage as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( in3_filter_t_ ) , "::" , stringify ! ( is_first_usage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_filter_t_ > ( ) ) ) . release as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( in3_filter_t_ ) , "::" , stringify ! ( release ) ) ) ; } pub type in3_filter_t = in3_filter_t_ ; # [ doc = " Handler which is added to client config in order to handle filter." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_filter_handler_t_ { pub array : * mut * mut in3_filter_t , # [ doc = " array of filters" ] pub count : usize , } # [ test ] fn bindgen_test_layout_in3_filter_handler_t_ ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_filter_handler_t_ > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( in3_filter_handler_t_ ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_filter_handler_t_ > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_filter_handler_t_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_filter_handler_t_ > ( ) ) ) . array as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_filter_handler_t_ ) , "::" , stringify ! ( array ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_filter_handler_t_ > ( ) ) ) . count as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in3_filter_handler_t_ ) , "::" , stringify ! ( count ) ) ) ; } # [ doc = " Handler which is added to client config in order to handle filter." ] pub type in3_filter_handler_t = in3_filter_handler_t_ ; # [ doc = " Incubed Configuration." ] # [ doc = "" ] # [ doc = " This struct holds the configuration and also point to internal resources such as filters or chain configs." ] # [ doc = "" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_t_ { # [ doc = "< number of seconds requests can be cached." ] pub cache_timeout : u32 , # [ doc = "< the limit of nodes to store in the client." ] pub node_limit : u16 , # [ doc = "< the client key to sign requests (pointer to 32bytes private key seed)" ] pub key : * mut libc :: c_void , # [ doc = "< number of max bytes used to cache the code in memory" ] pub max_code_cache : u32 , # [ doc = "< number of number of blocks cached  in memory" ] pub max_block_cache : u32 , # [ doc = "< the type of proof used" ] pub proof : in3_proof_t , # [ doc = "< the number of request send when getting a first answer" ] pub request_count : u8 , # [ doc = "< the number of signatures used to proof the blockhash." ] pub signature_count : u8 , # [ doc = "< min stake of the server. Only nodes owning at least this amount will be chosen." ] pub min_deposit : u64 , # [ doc = "< if specified, the blocknumber *latest* will be replaced by blockNumber- specified value" ] pub replace_latest_block : u8 , # [ doc = "< the number of signatures in percent required for the request" ] pub finality : u16 , # [ doc = "< the max number of attempts before giving up" ] pub max_attempts : uint_fast16_t , # [ doc = "< max number of verified hashes to cache" ] pub max_verified_hashes : uint_fast16_t , # [ doc = "< specifies the number of milliseconds before the request times out. increasing may be helpful if the device uses a slow connection." ] pub timeout : u32 , # [ doc = "< servers to filter for the given chain. The chain-id based on EIP-155." ] pub chain_id : chain_id_t , # [ doc = "< a cache handler offering 2 functions ( setItem(string,string), getItem(string) )" ] pub cache : * mut in3_storage_handler_t , # [ doc = "< signer-struct managing a wallet" ] pub signer : * mut in3_signer_t , # [ doc = "< the transporthandler sending requests" ] pub transport : in3_transport_send , # [ doc = "< a bit mask with flags defining the behavior of the incubed client. See the FLAG...-defines" ] pub flags : uint_fast8_t , # [ doc = "< chain spec and nodeList definitions" ] pub chains : * mut in3_chain_t , # [ doc = "< number of configured chains" ] pub chains_length : u16 , # [ doc = "< filter handler" ] pub filters : * mut in3_filter_handler_t , # [ doc = "< used to identify the capabilities of the node." ] pub node_props : in3_node_props_t , # [ doc = "< pointer to internal data" ] pub internal : * mut libc :: c_void , } # [ test ] fn bindgen_test_layout_in3_t_ ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_t_ > ( ) , 144usize , concat ! ( "Size of: " , stringify ! ( in3_t_ ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_t_ > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_t_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . cache_timeout as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( cache_timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . node_limit as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( node_limit ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . key as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( key ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . max_code_cache as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( max_code_cache ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . max_block_cache as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( max_block_cache ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . proof as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( proof ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . request_count as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( request_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . signature_count as * const _ as usize } , 29usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( signature_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . min_deposit as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( min_deposit ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . replace_latest_block as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( replace_latest_block ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . finality as * const _ as usize } , 42usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( finality ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . max_attempts as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( max_attempts ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . max_verified_hashes as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( max_verified_hashes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . timeout as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . chain_id as * const _ as usize } , 68usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( chain_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . cache as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( cache ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . signer as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( signer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . transport as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( transport ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . flags as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . chains as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( chains ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . chains_length as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( chains_length ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . filters as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( filters ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . node_props as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( node_props ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_t_ > ( ) ) ) . internal as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( in3_t_ ) , "::" , stringify ! ( internal ) ) ) ; } extern "C" { # [ doc = " creates a new Incubes configuration and returns the pointer." ] # [ doc = "" ] # [ doc = " This Method is depricated. you should use `in3_for_chain(ETH_CHAIN_ID_MULTICHAIN)` instead." ] # [ doc = "" ] # [ doc = " you need to free this instance with `in3_free` after use!" ] # [ doc = "" ] # [ doc = " Before using the client you still need to set the tramsport and optional the storage handlers:" ] # [ doc = "" ] # [ doc = "  * example of initialization:" ] # [ doc = " ```c" ] # [ doc = " // register verifiers" ] # [ doc = " in3_register_eth_full();" ] # [ doc = "" ] # [ doc = " // create new client" ] # [ doc = " in3_t* client = in3_new();" ] # [ doc = "" ] # [ doc = " // configure transport" ] # [ doc = " client->transport    = send_curl;" ] # [ doc = "" ] # [ doc = " // configure storage" ] # [ doc = " in3_set_storage_handler(c, storage_get_item, storage_set_item, storage_clear, NULL);" ] # [ doc = "" ] # [ doc = " // ready to use ..." ] # [ doc = " ```" ] # [ doc = "" ] # [ doc = " @returns the incubed instance." ] pub fn in3_new ( ) -> * mut in3_t ; } extern "C" { pub fn in3_for_chain_default ( chain_id : chain_id_t ) -> * mut in3_t ; } extern "C" { # [ doc = " sends a request and stores the result in the provided buffer" ] pub fn in3_client_rpc ( c : * mut in3_t , method : * const libc :: c_char , params : * const libc :: c_char , result : * mut * mut libc :: c_char , error : * mut * mut libc :: c_char ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " sends a request and stores the result in the provided buffer" ] pub fn in3_client_rpc_raw ( c : * mut in3_t , request : * const libc :: c_char , result : * mut * mut libc :: c_char , error : * mut * mut libc :: c_char ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " executes a request and returns result as string. in case of an error, the error-property of the result will be set." ] # [ doc = " The resulting string must be free by the the caller of this function!" ] pub fn in3_client_exec_req ( c : * mut in3_t , req : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { # [ doc = " adds a response for a request-object." ] # [ doc = " This function should be used in the transport-function to set the response." ] pub fn in3_req_add_response ( res : * mut in3_response_t , index : libc :: c_int , is_error : bool , data : * const libc :: c_char , data_len : libc :: c_int ) ; } extern "C" { # [ doc = " registers a new chain or replaces a existing (but keeps the nodelist)" ] pub fn in3_client_register_chain ( client : * mut in3_t , chain_id : chain_id_t , type_ : in3_chain_type_t , contract : * mut u8 , registry_id : * mut u8 , version : u8 , wl_contract : * mut u8 ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " adds a node to a chain ore updates a existing node" ] pub fn in3_client_add_node ( client : * mut in3_t , chain_id : chain_id_t , url : * mut libc :: c_char , props : in3_node_props_t , address : * mut u8 ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " removes a node from a nodelist" ] pub fn in3_client_remove_node ( client : * mut in3_t , chain_id : chain_id_t , address : * mut u8 ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " removes all nodes from the nodelist" ] pub fn in3_client_clear_nodes ( client : * mut in3_t , chain_id : chain_id_t ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " frees the references of the client" ] pub fn in3_free ( a : * mut in3_t ) ; } extern "C" { # [ doc = " inits the cache." ] # [ doc = "" ] # [ doc = " this will try to read the nodelist from cache." ] pub fn in3_cache_init ( c : * mut in3_t ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " finds the chain-config for the given chain_id." ] # [ doc = "" ] # [ doc = " My return NULL if not found." ] pub fn in3_find_chain ( c : * mut in3_t , chain_id : chain_id_t ) -> * mut in3_chain_t ; } extern "C" { # [ doc = " configures the clent based on a json-config." ] # [ doc = "" ] # [ doc = " For details about the structure of ther config see https://in3.readthedocs.io/en/develop/api-ts.html#type-in3config" ] # [ doc = " Returns NULL on success, and error string on failure (to be freed by caller) - in which case the client state is undefined" ] pub fn in3_configure ( c : * mut in3_t , config : * const libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { # [ doc = " gets the current config as json." ] # [ doc = "" ] # [ doc = " For details about the structure of ther config see https://in3.readthedocs.io/en/develop/api-ts.html#type-in3config" ] pub fn in3_get_config ( c : * mut in3_t ) -> * mut libc :: c_char ; } extern "C" { # [ doc = " defines a default transport which is used when creating a new client." ] pub fn in3_set_default_transport ( transport : in3_transport_send ) ; } extern "C" { # [ doc = " defines a default storage handler which is used when creating a new client." ] pub fn in3_set_default_storage ( cacheStorage : * mut in3_storage_handler_t ) ; } extern "C" { # [ doc = " defines a default signer which is used when creating a new client." ] pub fn in3_set_default_signer ( signer : * mut in3_signer_t ) ; } extern "C" { # [ doc = " create a new signer-object to be set on the client." ] # [ doc = " the caller will need to free this pointer after usage." ] pub fn in3_create_signer ( sign : in3_sign , prepare_tx : in3_prepare_tx , wallet : * mut libc :: c_void ) -> * mut in3_signer_t ; } extern "C" { # [ doc = " create a new storage handler-object to be set on the client." ] # [ doc = " the caller will need to free this pointer after usage." ] pub fn in3_set_storage_handler ( c : * mut in3_t , get_item : in3_storage_get_item , set_item : in3_storage_set_item , clear : in3_storage_clear , cptr : * mut libc :: c_void ) -> * mut in3_storage_handler_t ; } # [ repr ( u32 ) ] # [ doc = " type of the request context," ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum ctx_type { # [ doc = "< a json-rpc request, which needs to be send to a incubed node" ] CT_RPC = 0 , # [ doc = "< a sign request" ] CT_SIGN = 1 , } # [ doc = " type of the request context," ] pub use self :: ctx_type as ctx_type_t ; # [ doc = " the weight of a certain node as linked list." ] # [ doc = "" ] # [ doc = " This will be used when picking the nodes to send the request to. A linked list of these structs desribe the result." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct weight { # [ doc = "< the node definition including the url" ] pub node : * mut in3_node_t , # [ doc = "< the current weight and blacklisting-stats" ] pub weight : * mut in3_node_weight_t , # [ doc = "< The starting value" ] pub s : f32 , # [ doc = "< weight value" ] pub w : f32 , # [ doc = "< next in the linkedlist or NULL if this is the last element" ] pub next : * mut weight , } # [ test ] fn bindgen_test_layout_weight ( ) { assert_eq ! ( :: core :: mem :: size_of :: < weight > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( weight ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < weight > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( weight ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < weight > ( ) ) ) . node as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( weight ) , "::" , stringify ! ( node ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < weight > ( ) ) ) . weight as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( weight ) , "::" , stringify ! ( weight ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < weight > ( ) ) ) . s as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( weight ) , "::" , stringify ! ( s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < weight > ( ) ) ) . w as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( weight ) , "::" , stringify ! ( w ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < weight > ( ) ) ) . next as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( weight ) , "::" , stringify ! ( next ) ) ) ; } # [ doc = " the weight of a certain node as linked list." ] # [ doc = "" ] # [ doc = " This will be used when picking the nodes to send the request to. A linked list of these structs desribe the result." ] pub type node_match_t = weight ; # [ doc = " The Request config." ] # [ doc = "" ] # [ doc = " This is generated for each request and represents the current state. it holds the state until the request is finished and must be freed afterwards." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in3_ctx { # [ doc = " the type of the request" ] pub type_ : ctx_type_t , # [ doc = " reference to the client" ] pub client : * mut in3_t , # [ doc = " the result of the json-parser for the request." ] pub request_context : * mut json_ctx_t , # [ doc = " the result of the json-parser for the response." ] pub response_context : * mut json_ctx_t , # [ doc = " in case of an error this will hold the message, if not it points to `NULL`" ] pub error : * mut libc :: c_char , # [ doc = " the number of requests" ] pub len : libc :: c_int , # [ doc = " the number of attempts" ] pub attempt : libc :: c_uint , # [ doc = " references to the tokens representring the parsed responses" ] pub responses : * mut * mut d_token_t , # [ doc = " references to the tokens representring the requests" ] pub requests : * mut * mut d_token_t , # [ doc = "configs for a request." ] pub requests_configs : * mut in3_request_config_t , pub nodes : * mut node_match_t , # [ doc = " optional cache-entries." ] # [ doc = "" ] # [ doc = " These entries will be freed when cleaning up the context." ] pub cache : * mut cache_entry_t , # [ doc = " the raw response-data, which should be verified." ] pub raw_response : * mut in3_response_t , # [ doc = " pointer to the next required context. if not NULL the data from this context need get finished first, before being able to resume this context." ] pub required : * mut in3_ctx , # [ doc = " state of the verification" ] pub verification_state : in3_ret_t :: Type , } # [ test ] fn bindgen_test_layout_in3_ctx ( ) { assert_eq ! ( :: core :: mem :: size_of :: < in3_ctx > ( ) , 112usize , concat ! ( "Size of: " , stringify ! ( in3_ctx ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < in3_ctx > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( in3_ctx ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . client as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( client ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . request_context as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( request_context ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . response_context as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( response_context ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . error as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( error ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . len as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . attempt as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( attempt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . responses as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( responses ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . requests as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( requests ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . requests_configs as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( requests_configs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . nodes as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( nodes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . cache as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( cache ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . raw_response as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( raw_response ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . required as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( required ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < in3_ctx > ( ) ) ) . verification_state as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( in3_ctx ) , "::" , stringify ! ( verification_state ) ) ) ; } # [ doc = " The Request config." ] # [ doc = "" ] # [ doc = " This is generated for each request and represents the current state. it holds the state until the request is finished and must be freed afterwards." ] pub type in3_ctx_t = in3_ctx ; # [ repr ( i32 ) ] # [ doc = " The current state of the context." ] # [ doc = "" ] # [ doc = " you can check this state after each execute-call." ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum state { # [ doc = "< The ctx has a verified result." ] CTX_SUCCESS = 0 , # [ doc = "< there are required contexts, which need to be resolved first" ] CTX_WAITING_FOR_REQUIRED_CTX = 1 , # [ doc = "< the response is not set yet" ] CTX_WAITING_FOR_RESPONSE = 2 , # [ doc = "< the request has a error" ] CTX_ERROR = -1 , } # [ doc = " The current state of the context." ] # [ doc = "" ] # [ doc = " you can check this state after each execute-call." ] pub use self :: state as in3_ctx_state_t ; extern "C" { # [ doc = " creates a new context." ] # [ doc = "" ] # [ doc = " the request data will be parsed and represented in the context." ] # [ doc = " calling this function will only parse the request data, but not send anything yet." ] # [ doc = "" ] # [ doc = "  *Important*: the req_data will not be cloned but used during the execution. The caller of the this function is also responsible for freeing this string afterwards." ] pub fn ctx_new ( client : * mut in3_t , req_data : * const libc :: c_char ) -> * mut in3_ctx_t ; } extern "C" { # [ doc = " sends a previously created context to nodes and verifies it." ] # [ doc = "" ] # [ doc = " The execution happens within the same thread, thich mean it will be blocked until the response ha beedn received and verified." ] # [ doc = " In order to handle calls asynchronously, you need to call the `in3_ctx_execute` function and provide the data as needed." ] pub fn in3_send_ctx ( ctx : * mut in3_ctx_t ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " execute the context, but stops whenever data are required." ] # [ doc = "" ] # [ doc = " This function should be used in order to call data in a asyncronous way," ] # [ doc = " since this function will not use the transport-function to actually send it." ] # [ doc = "" ] # [ doc = " The caller is responsible for delivering the required responses." ] # [ doc = " After calling you need to check the return-value:" ] # [ doc = " - IN3_WAITING : provide the required data and then call in3_ctx_execute again." ] # [ doc = " - IN3_OK : success, we have a result." ] # [ doc = " - any other status = error" ] # [ doc = "" ] # [ doc = " ```" ] # [ doc = " digraph G {" ] # [ doc = "node[fontname=\"Helvetica\",   shape=Box, color=lightblue, style=filled ]" ] # [ doc = "edge[fontname=\"Helvetica\",   style=solid,  fontsize=8 , color=grey]" ] # [ doc = "rankdir = LR;" ] # [ doc = "" ] # [ doc = "RPC[label=\"RPC-Request\"]" ] # [ doc = "CTX[label=\"in3_ctx_t\"]" ] # [ doc = "" ] # [ doc = "sign[label=\"sign data\",color=lightgrey, style=\"\"]" ] # [ doc = "request[label=\"fetch data\",color=lightgrey, style=\"\"]" ] # [ doc = "" ] # [ doc = "exec[ label=\"in3_ctx_execute()\",color=lightgrey, style=\"\", shape=circle ]" ] # [ doc = "free[label=\"ctx_free()\",color=lightgrey, style=\"\"]" ] # [ doc = "" ] # [ doc = "" ] # [ doc = "RPC -> CTX [label=\"ctx_new()\"]" ] # [ doc = "CTX -> exec" ] # [ doc = "" ] # [ doc = "" ] # [ doc = "exec -> error [label=\"IN3_...\"]" ] # [ doc = "exec -> response[label=\"IN3_OK\"]" ] # [ doc = "exec -> waiting[label=\"IN3_WAITING\"]" ] # [ doc = "" ] # [ doc = "waiting -> sign[label=CT_SIGN]" ] # [ doc = "waiting -> request[label=CT_RPC]" ] # [ doc = "" ] # [ doc = "sign -> exec [label=\"in3_req_add_response()\"]" ] # [ doc = "request -> exec[label=\"in3_req_add_response()\"]" ] # [ doc = "" ] # [ doc = "response -> free" ] # [ doc = "error->free" ] # [ doc = "" ] # [ doc = "" ] # [ doc = "{ rank = same; exec, sign, request }" ] # [ doc = "" ] # [ doc = "" ] # [ doc = "" ] # [ doc = "}" ] # [ doc = " ```" ] # [ doc = "" ] # [ doc = " Here is a example how to use this function:" ] # [ doc = "" ] # [ doc = " ```c" ] # [ doc = "" ] # [ doc = "in3_ret_t in3_send_ctx(in3_ctx_t* ctx) {" ] # [ doc = "in3_ret_t ret;" ] # [ doc = "while ((ret = in3_ctx_execute(ctx))) {" ] # [ doc = "if (ret != IN3_WAITING) return ret;" ] # [ doc = "" ] # [ doc = "while (ctx->required && in3_ctx_state(ctx->required) != CTX_SUCCESS) {" ] # [ doc = "if ((ret = in3_send_ctx(ctx->required))) return ret;" ] # [ doc = "" ] # [ doc = "if ((ret = in3_ctx_execute(ctx)) != IN3_WAITING) return ret;" ] # [ doc = "}" ] # [ doc = "" ] # [ doc = "if (!ctx->raw_response) {" ] # [ doc = "" ] # [ doc = "switch (ctx->type) {" ] # [ doc = "" ] # [ doc = "case CT_RPC: {" ] # [ doc = "" ] # [ doc = "in3_request_t* request = in3_create_request(ctx);" ] # [ doc = "" ] # [ doc = "ctx->client->transport(request);" ] # [ doc = "" ] # [ doc = "request_free(request, ctx, false);" ] # [ doc = "break;" ] # [ doc = "}" ] # [ doc = "" ] # [ doc = "case CT_SIGN: {" ] # [ doc = "d_token_t* params = d_get(ctx->requests[0], K_PARAMS);" ] # [ doc = "bytes_t    data   = d_to_bytes(d_get_at(params, 0));" ] # [ doc = "bytes_t    from   = d_to_bytes(d_get_at(params, 1));" ] # [ doc = "" ] # [ doc = "ctx->raw_response = _malloc(sizeof(in3_response_t));" ] # [ doc = "sb_init(&ctx->raw_response[0].error);" ] # [ doc = "sb_init(&ctx->raw_response[0].result);" ] # [ doc = "" ] # [ doc = "uint8_t sig[65];" ] # [ doc = "ret = ctx->client->signer->sign(ctx, SIGN_EC_HASH, data, from, sig);" ] # [ doc = "if (ret < 0) return ctx_set_error(ctx, ctx->raw_response->error.data, ret);" ] # [ doc = "sb_add_range(&ctx->raw_response->result, (char*) sig, 0, 65);" ] # [ doc = "}" ] # [ doc = "}" ] # [ doc = "}" ] # [ doc = "}" ] # [ doc = "return ret;" ] # [ doc = "}" ] # [ doc = " ```" ] # [ doc = "" ] # [ doc = "" ] # [ doc = "" ] # [ doc = "" ] pub fn in3_ctx_execute ( ctx : * mut in3_ctx_t ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " returns the current state of the context." ] pub fn in3_ctx_state ( ctx : * mut in3_ctx_t ) -> in3_ctx_state_t ; } extern "C" { # [ doc = " frees all resources allocated during the request." ] # [ doc = "" ] # [ doc = " But this will not free the request string passed when creating the context!" ] pub fn ctx_free ( ctx : * mut in3_ctx_t ) ; } extern "C" { # [ doc = " adds a new context as a requirment." ] # [ doc = "" ] # [ doc = " Whenever a verifier needs more data and wants to send a request, we should create the request and add it as dependency and stop." ] # [ doc = "" ] # [ doc = " If the function is called again, we need to search and see if the required status is now useable." ] # [ doc = "" ] # [ doc = " Here is an example of how to use it:" ] # [ doc = "" ] # [ doc = " ```c" ] # [ doc = "in3_ret_t get_from_nodes(in3_ctx_t* parent, char* method, char* params, bytes_t* dst) {" ] # [ doc = "in3_ctx_t* ctx = ctx_find_required(parent, method);" ] # [ doc = "if (ctx) {" ] # [ doc = "switch (in3_ctx_state(ctx)) {" ] # [ doc = "case CTX_ERROR:" ] # [ doc = "return ctx_set_error(parent, ctx->error, IN3_EUNKNOWN);" ] # [ doc = "case CTX_WAITING_FOR_REQUIRED_CTX:" ] # [ doc = "case CTX_WAITING_FOR_RESPONSE:" ] # [ doc = "return IN3_WAITING;" ] # [ doc = "" ] # [ doc = "case CTX_SUCCESS: {" ] # [ doc = "d_token_t* r = d_get(ctx->responses[0], K_RESULT);" ] # [ doc = "if (r) {" ] # [ doc = "dst = d_to_bytes(r);" ] # [ doc = "return IN3_OK;" ] # [ doc = "} else" ] # [ doc = "return ctx_check_response_error(parent, 0);" ] # [ doc = "}" ] # [ doc = "}" ] # [ doc = "}" ] # [ doc = "" ] # [ doc = "" ] # [ doc = "char* req = _malloc(strlen(method) + strlen(params) + 200);" ] # [ doc = "sprintf(req, \"{\\\"method\\\":\\\"%s\\\",\\\"jsonrpc\\\":\\\"2.0\\\",\\\"id\\\":1,\\\"params\\\":%s}\", method, params);" ] # [ doc = "return ctx_add_required(parent, ctx_new(parent->client, req));" ] # [ doc = "}" ] # [ doc = " ```" ] pub fn ctx_add_required ( parent : * mut in3_ctx_t , ctx : * mut in3_ctx_t ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " searches within the required request contextes for one with the given method." ] # [ doc = "" ] # [ doc = " This method is used internaly to find a previously added context." ] pub fn ctx_find_required ( parent : * const in3_ctx_t , method : * const libc :: c_char ) -> * mut in3_ctx_t ; } extern "C" { # [ doc = " removes a required context after usage." ] # [ doc = " removing will also call free_ctx to free resources." ] pub fn ctx_remove_required ( parent : * mut in3_ctx_t , ctx : * mut in3_ctx_t ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " check if the response contains a error-property and reports this as error in the context." ] pub fn ctx_check_response_error ( c : * mut in3_ctx_t , i : libc :: c_int ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " determins the errorcode for the given request." ] pub fn ctx_get_error ( ctx : * mut in3_ctx_t , id : libc :: c_int ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " sends a request and returns a context used to access the result or errors." ] # [ doc = "" ] # [ doc = " This context *MUST* be freed with ctx_free(ctx) after usage to release the resources." ] pub fn in3_client_rpc_ctx_raw ( c : * mut in3_t , request : * const libc :: c_char ) -> * mut in3_ctx_t ; } extern "C" { # [ doc = " sends a request and returns a context used to access the result or errors." ] # [ doc = "" ] # [ doc = " This context *MUST* be freed with ctx_free(ctx) after usage to release the resources." ] pub fn in3_client_rpc_ctx ( c : * mut in3_t , method : * const libc :: c_char , params : * const libc :: c_char ) -> * mut in3_ctx_t ; } extern "C" { # [ doc = " creates a request-object, which then need to be filled with the responses." ] # [ doc = "" ] # [ doc = " each request object contains a array of reponse-objects. In order to set the response, you need to call" ] # [ doc = "" ] # [ doc = " ```c" ] # [ doc = " // set a succesfull response" ] # [ doc = " sb_add_chars(&request->results[0].result, my_response);" ] # [ doc = " // set a error response" ] # [ doc = " sb_add_chars(&request->results[0].error, my_error);" ] # [ doc = " ```" ] pub fn in3_create_request ( ctx : * mut in3_ctx_t ) -> * mut in3_request_t ; } extern "C" { # [ doc = " frees a previuosly allocated request." ] pub fn request_free ( req : * mut in3_request_t , ctx : * const in3_ctx_t , response_free : bool ) ; } extern "C" { # [ doc = " sets the error message in the context." ] # [ doc = "" ] # [ doc = " If there is a previous error it will append it." ] # [ doc = " the return value will simply be passed so you can use it like" ] # [ doc = "" ] # [ doc = " ```c" ] # [ doc = "   return ctx_set_error(ctx, \"wrong number of arguments\", IN3_EINVAL)" ] # [ doc = " ```" ] pub fn ctx_set_error_intern ( c : * mut in3_ctx_t , msg : * mut libc :: c_char , errnumber : in3_ret_t :: Type ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " handles a failable context" ] # [ doc = "" ] # [ doc = " This context *MUST* be freed with ctx_free(ctx) after usage to release the resources." ] pub fn ctx_handle_failable ( ctx : * mut in3_ctx_t ) -> in3_ret_t :: Type ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct bignum256 { pub val : [ u32 ; 9usize ] , } # [ test ] fn bindgen_test_layout_bignum256 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < bignum256 > ( ) , 36usize , concat ! ( "Size of: " , stringify ! ( bignum256 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < bignum256 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( bignum256 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bignum256 > ( ) ) ) . val as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( bignum256 ) , "::" , stringify ! ( val ) ) ) ; } extern "C" { pub fn read_be ( data : * const u8 ) -> u32 ; } extern "C" { pub fn write_be ( data : * mut u8 , x : u32 ) ; } extern "C" { pub fn read_le ( data : * const u8 ) -> u32 ; } extern "C" { pub fn write_le ( data : * mut u8 , x : u32 ) ; } extern "C" { pub fn bn_read_be ( in_number : * const u8 , out_number : * mut bignum256 ) ; } extern "C" { pub fn bn_write_be ( in_number : * const bignum256 , out_number : * mut u8 ) ; } extern "C" { pub fn bn_read_le ( in_number : * const u8 , out_number : * mut bignum256 ) ; } extern "C" { pub fn bn_write_le ( in_number : * const bignum256 , out_number : * mut u8 ) ; } extern "C" { pub fn bn_read_uint32 ( in_number : u32 , out_number : * mut bignum256 ) ; } extern "C" { pub fn bn_read_uint64 ( in_number : u64 , out_number : * mut bignum256 ) ; } extern "C" { pub fn bn_bitcount ( a : * const bignum256 ) -> libc :: c_int ; } extern "C" { pub fn bn_digitcount ( a : * const bignum256 ) -> libc :: c_uint ; } extern "C" { pub fn bn_zero ( a : * mut bignum256 ) ; } extern "C" { pub fn bn_is_zero ( a : * const bignum256 ) -> libc :: c_int ; } extern "C" { pub fn bn_one ( a : * mut bignum256 ) ; } extern "C" { pub fn bn_is_less ( a : * const bignum256 , b : * const bignum256 ) -> libc :: c_int ; } extern "C" { pub fn bn_is_equal ( a : * const bignum256 , b : * const bignum256 ) -> libc :: c_int ; } extern "C" { pub fn bn_cmov ( res : * mut bignum256 , cond : libc :: c_int , truecase : * const bignum256 , falsecase : * const bignum256 ) ; } extern "C" { pub fn bn_lshift ( a : * mut bignum256 ) ; } extern "C" { pub fn bn_rshift ( a : * mut bignum256 ) ; } extern "C" { pub fn bn_setbit ( a : * mut bignum256 , bit : u8 ) ; } extern "C" { pub fn bn_clearbit ( a : * mut bignum256 , bit : u8 ) ; } extern "C" { pub fn bn_testbit ( a : * mut bignum256 , bit : u8 ) -> u32 ; } extern "C" { pub fn bn_xor ( a : * mut bignum256 , b : * const bignum256 , c : * const bignum256 ) ; } extern "C" { pub fn bn_mult_half ( x : * mut bignum256 , prime : * const bignum256 ) ; } extern "C" { pub fn bn_mult_k ( x : * mut bignum256 , k : u8 , prime : * const bignum256 ) ; } extern "C" { pub fn bn_mod ( x : * mut bignum256 , prime : * const bignum256 ) ; } extern "C" { pub fn bn_multiply ( k : * const bignum256 , x : * mut bignum256 , prime : * const bignum256 ) ; } extern "C" { pub fn bn_fast_mod ( x : * mut bignum256 , prime : * const bignum256 ) ; } extern "C" { pub fn bn_sqrt ( x : * mut bignum256 , prime : * const bignum256 ) ; } extern "C" { pub fn bn_inverse ( x : * mut bignum256 , prime : * const bignum256 ) ; } extern "C" { pub fn bn_normalize ( a : * mut bignum256 ) ; } extern "C" { pub fn bn_add ( a : * mut bignum256 , b : * const bignum256 ) ; } extern "C" { pub fn bn_addmod ( a : * mut bignum256 , b : * const bignum256 , prime : * const bignum256 ) ; } extern "C" { pub fn bn_addi ( a : * mut bignum256 , b : u32 ) ; } extern "C" { pub fn bn_subi ( a : * mut bignum256 , b : u32 , prime : * const bignum256 ) ; } extern "C" { pub fn bn_subtractmod ( a : * const bignum256 , b : * const bignum256 , res : * mut bignum256 , prime : * const bignum256 ) ; } extern "C" { pub fn bn_subtract ( a : * const bignum256 , b : * const bignum256 , res : * mut bignum256 ) ; } extern "C" { pub fn bn_divmod58 ( a : * mut bignum256 , r : * mut u32 ) ; } extern "C" { pub fn bn_divmod1000 ( a : * mut bignum256 , r : * mut u32 ) ; } extern "C" { pub fn bn_format ( amnt : * const bignum256 , prefix : * const libc :: c_char , suffix : * const libc :: c_char , decimals : libc :: c_uint , exponent : libc :: c_int , trailing : bool , out : * mut libc :: c_char , outlen : usize ) -> usize ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct _SHA1_CTX { pub state : [ u32 ; 5usize ] , pub bitcount : u64 , pub buffer : [ u32 ; 16usize ] , } # [ test ] fn bindgen_test_layout__SHA1_CTX ( ) { assert_eq ! ( :: core :: mem :: size_of :: < _SHA1_CTX > ( ) , 96usize , concat ! ( "Size of: " , stringify ! ( _SHA1_CTX ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < _SHA1_CTX > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( _SHA1_CTX ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _SHA1_CTX > ( ) ) ) . state as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _SHA1_CTX ) , "::" , stringify ! ( state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _SHA1_CTX > ( ) ) ) . bitcount as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( _SHA1_CTX ) , "::" , stringify ! ( bitcount ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _SHA1_CTX > ( ) ) ) . buffer as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( _SHA1_CTX ) , "::" , stringify ! ( buffer ) ) ) ; } pub type SHA1_CTX = _SHA1_CTX ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct _SHA256_CTX { pub state : [ u32 ; 8usize ] , pub bitcount : u64 , pub buffer : [ u32 ; 16usize ] , } # [ test ] fn bindgen_test_layout__SHA256_CTX ( ) { assert_eq ! ( :: core :: mem :: size_of :: < _SHA256_CTX > ( ) , 104usize , concat ! ( "Size of: " , stringify ! ( _SHA256_CTX ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < _SHA256_CTX > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( _SHA256_CTX ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _SHA256_CTX > ( ) ) ) . state as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _SHA256_CTX ) , "::" , stringify ! ( state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _SHA256_CTX > ( ) ) ) . bitcount as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( _SHA256_CTX ) , "::" , stringify ! ( bitcount ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _SHA256_CTX > ( ) ) ) . buffer as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( _SHA256_CTX ) , "::" , stringify ! ( buffer ) ) ) ; } pub type SHA256_CTX = _SHA256_CTX ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct _SHA512_CTX { pub state : [ u64 ; 8usize ] , pub bitcount : [ u64 ; 2usize ] , pub buffer : [ u64 ; 16usize ] , } # [ test ] fn bindgen_test_layout__SHA512_CTX ( ) { assert_eq ! ( :: core :: mem :: size_of :: < _SHA512_CTX > ( ) , 208usize , concat ! ( "Size of: " , stringify ! ( _SHA512_CTX ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < _SHA512_CTX > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( _SHA512_CTX ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _SHA512_CTX > ( ) ) ) . state as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _SHA512_CTX ) , "::" , stringify ! ( state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _SHA512_CTX > ( ) ) ) . bitcount as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( _SHA512_CTX ) , "::" , stringify ! ( bitcount ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _SHA512_CTX > ( ) ) ) . buffer as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( _SHA512_CTX ) , "::" , stringify ! ( buffer ) ) ) ; } pub type SHA512_CTX = _SHA512_CTX ; extern "C" { pub static sha256_initial_hash_value : [ u32 ; 8usize ] ; } extern "C" { pub static sha512_initial_hash_value : [ u64 ; 8usize ] ; } extern "C" { pub fn sha1_Transform ( state_in : * const u32 , data : * const u32 , state_out : * mut u32 ) ; } extern "C" { pub fn sha1_Init ( arg1 : * mut SHA1_CTX ) ; } extern "C" { pub fn sha1_Update ( arg1 : * mut SHA1_CTX , arg2 : * const u8 , arg3 : usize ) ; } extern "C" { pub fn sha1_Final ( arg1 : * mut SHA1_CTX , arg2 : * mut u8 ) ; } extern "C" { pub fn sha1_End ( arg1 : * mut SHA1_CTX , arg2 : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn sha1_Raw ( arg1 : * const u8 , arg2 : usize , arg3 : * mut u8 ) ; } extern "C" { pub fn sha1_Data ( arg1 : * const u8 , arg2 : usize , arg3 : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn sha256_Transform ( state_in : * const u32 , data : * const u32 , state_out : * mut u32 ) ; } extern "C" { pub fn sha256_Init ( arg1 : * mut SHA256_CTX ) ; } extern "C" { pub fn sha256_Update ( arg1 : * mut SHA256_CTX , arg2 : * const u8 , arg3 : usize ) ; } extern "C" { pub fn sha256_Final ( arg1 : * mut SHA256_CTX , arg2 : * mut u8 ) ; } extern "C" { pub fn sha256_End ( arg1 : * mut SHA256_CTX , arg2 : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn sha256_Raw ( arg1 : * const u8 , arg2 : usize , arg3 : * mut u8 ) ; } extern "C" { pub fn sha256_Data ( arg1 : * const u8 , arg2 : usize , arg3 : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn sha512_Transform ( state_in : * const u64 , data : * const u64 , state_out : * mut u64 ) ; } extern "C" { pub fn sha512_Init ( arg1 : * mut SHA512_CTX ) ; } extern "C" { pub fn sha512_Update ( arg1 : * mut SHA512_CTX , arg2 : * const u8 , arg3 : usize ) ; } extern "C" { pub fn sha512_Final ( arg1 : * mut SHA512_CTX , arg2 : * mut u8 ) ; } extern "C" { pub fn sha512_End ( arg1 : * mut SHA512_CTX , arg2 : * mut libc :: c_char ) -> * mut libc :: c_char ; } extern "C" { pub fn sha512_Raw ( arg1 : * const u8 , arg2 : usize , arg3 : * mut u8 ) ; } extern "C" { pub fn sha512_Data ( arg1 : * const u8 , arg2 : usize , arg3 : * mut libc :: c_char ) -> * mut libc :: c_char ; } # [ doc = " SHA3 Algorithm context." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SHA3_CTX { pub hash : [ u64 ; 25usize ] , pub message : [ u64 ; 24usize ] , pub rest : libc :: c_uint , pub block_size : libc :: c_uint , } # [ test ] fn bindgen_test_layout_SHA3_CTX ( ) { assert_eq ! ( :: core :: mem :: size_of :: < SHA3_CTX > ( ) , 400usize , concat ! ( "Size of: " , stringify ! ( SHA3_CTX ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < SHA3_CTX > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( SHA3_CTX ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SHA3_CTX > ( ) ) ) . hash as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( SHA3_CTX ) , "::" , stringify ! ( hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SHA3_CTX > ( ) ) ) . message as * const _ as usize } , 200usize , concat ! ( "Offset of field: " , stringify ! ( SHA3_CTX ) , "::" , stringify ! ( message ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SHA3_CTX > ( ) ) ) . rest as * const _ as usize } , 392usize , concat ! ( "Offset of field: " , stringify ! ( SHA3_CTX ) , "::" , stringify ! ( rest ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SHA3_CTX > ( ) ) ) . block_size as * const _ as usize } , 396usize , concat ! ( "Offset of field: " , stringify ! ( SHA3_CTX ) , "::" , stringify ! ( block_size ) ) ) ; } extern "C" { pub fn sha3_224_Init ( ctx : * mut SHA3_CTX ) ; } extern "C" { pub fn sha3_256_Init ( ctx : * mut SHA3_CTX ) ; } extern "C" { pub fn sha3_384_Init ( ctx : * mut SHA3_CTX ) ; } extern "C" { pub fn sha3_512_Init ( ctx : * mut SHA3_CTX ) ; } extern "C" { pub fn sha3_Update ( ctx : * mut SHA3_CTX , msg : * const libc :: c_uchar , size : usize ) ; } extern "C" { pub fn sha3_Final ( ctx : * mut SHA3_CTX , result : * mut libc :: c_uchar ) ; } extern "C" { pub fn keccak_Final ( ctx : * mut SHA3_CTX , result : * mut libc :: c_uchar ) ; } extern "C" { pub fn keccak_256 ( data : * const libc :: c_uchar , len : usize , digest : * mut libc :: c_uchar ) ; } extern "C" { pub fn keccak_512 ( data : * const libc :: c_uchar , len : usize , digest : * mut libc :: c_uchar ) ; } extern "C" { pub fn sha3_256 ( data : * const libc :: c_uchar , len : usize , digest : * mut libc :: c_uchar ) ; } extern "C" { pub fn sha3_512 ( data : * const libc :: c_uchar , len : usize , digest : * mut libc :: c_uchar ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct BLAKE256_CTX { pub h : [ u32 ; 8usize ] , pub s : [ u32 ; 4usize ] , pub t : [ u32 ; 2usize ] , pub buflen : usize , pub nullt : u8 , pub buf : [ u8 ; 64usize ] , } # [ test ] fn bindgen_test_layout_BLAKE256_CTX ( ) { assert_eq ! ( :: core :: mem :: size_of :: < BLAKE256_CTX > ( ) , 136usize , concat ! ( "Size of: " , stringify ! ( BLAKE256_CTX ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < BLAKE256_CTX > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( BLAKE256_CTX ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BLAKE256_CTX > ( ) ) ) . h as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( BLAKE256_CTX ) , "::" , stringify ! ( h ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BLAKE256_CTX > ( ) ) ) . s as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( BLAKE256_CTX ) , "::" , stringify ! ( s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BLAKE256_CTX > ( ) ) ) . t as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( BLAKE256_CTX ) , "::" , stringify ! ( t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BLAKE256_CTX > ( ) ) ) . buflen as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( BLAKE256_CTX ) , "::" , stringify ! ( buflen ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BLAKE256_CTX > ( ) ) ) . nullt as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( BLAKE256_CTX ) , "::" , stringify ! ( nullt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BLAKE256_CTX > ( ) ) ) . buf as * const _ as usize } , 65usize , concat ! ( "Offset of field: " , stringify ! ( BLAKE256_CTX ) , "::" , stringify ! ( buf ) ) ) ; } impl :: core :: fmt :: Debug for BLAKE256_CTX { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "BLAKE256_CTX {{ h: {:?}, s: {:?}, t: {:?}, buflen: {:?}, nullt: {:?}, buf: [...] }}" , self . h , self . s , self . t , self . buflen , self . nullt ) } } extern "C" { pub fn blake256_Init ( arg1 : * mut BLAKE256_CTX ) ; } extern "C" { pub fn blake256_Update ( arg1 : * mut BLAKE256_CTX , arg2 : * const u8 , arg3 : usize ) ; } extern "C" { pub fn blake256_Final ( arg1 : * mut BLAKE256_CTX , arg2 : * mut u8 ) ; } extern "C" { pub fn blake256 ( arg1 : * const u8 , arg2 : usize , arg3 : * mut u8 ) ; } # [ doc = " This structure is a context for Groestl-384 and Groestl-512 computations:" ] # [ doc = " it contains the intermediate values and some data from the last" ] # [ doc = " entered block. Once a Groestl computation has been performed, the" ] # [ doc = " context can be reused for another computation." ] # [ doc = "" ] # [ doc = " The contents of this structure are private. A running Groestl" ] # [ doc = " computation can be cloned by copying the context (e.g. with a simple" ] # [ doc = " <code>memcpy()</code>)." ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct sph_groestl_big_context { pub buf : [ libc :: c_uchar ; 128usize ] , pub ptr : usize , pub state : sph_groestl_big_context__bindgen_ty_1 , pub count : u64 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union sph_groestl_big_context__bindgen_ty_1 { pub wide : [ u64 ; 16usize ] , pub narrow : [ u32 ; 32usize ] , _bindgen_union_align : [ u64 ; 16usize ] , } # [ test ] fn bindgen_test_layout_sph_groestl_big_context__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < sph_groestl_big_context__bindgen_ty_1 > ( ) , 128usize , concat ! ( "Size of: " , stringify ! ( sph_groestl_big_context__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < sph_groestl_big_context__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sph_groestl_big_context__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < sph_groestl_big_context__bindgen_ty_1 > ( ) ) ) . wide as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sph_groestl_big_context__bindgen_ty_1 ) , "::" , stringify ! ( wide ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < sph_groestl_big_context__bindgen_ty_1 > ( ) ) ) . narrow as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sph_groestl_big_context__bindgen_ty_1 ) , "::" , stringify ! ( narrow ) ) ) ; } impl :: core :: fmt :: Debug for sph_groestl_big_context__bindgen_ty_1 { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "sph_groestl_big_context__bindgen_ty_1 {{ union }}" ) } } # [ test ] fn bindgen_test_layout_sph_groestl_big_context ( ) { assert_eq ! ( :: core :: mem :: size_of :: < sph_groestl_big_context > ( ) , 272usize , concat ! ( "Size of: " , stringify ! ( sph_groestl_big_context ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < sph_groestl_big_context > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sph_groestl_big_context ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < sph_groestl_big_context > ( ) ) ) . buf as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sph_groestl_big_context ) , "::" , stringify ! ( buf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < sph_groestl_big_context > ( ) ) ) . ptr as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( sph_groestl_big_context ) , "::" , stringify ! ( ptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < sph_groestl_big_context > ( ) ) ) . state as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( sph_groestl_big_context ) , "::" , stringify ! ( state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < sph_groestl_big_context > ( ) ) ) . count as * const _ as usize } , 264usize , concat ! ( "Offset of field: " , stringify ! ( sph_groestl_big_context ) , "::" , stringify ! ( count ) ) ) ; } impl :: core :: fmt :: Debug for sph_groestl_big_context { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "sph_groestl_big_context {{ buf: [...], ptr: {:?}, state: {:?}, count: {:?} }}" , self . ptr , self . state , self . count ) } } pub type GROESTL512_CTX = sph_groestl_big_context ; extern "C" { # [ doc = " Initialize a Groestl-512 context. This process performs no memory allocation." ] # [ doc = "" ] # [ doc = " @param cc   the Groestl-512 context (pointer to a" ] # [ doc = "             <code>GROESTL512_CTX</code>)" ] pub fn groestl512_Init ( cc : * mut libc :: c_void ) ; } extern "C" { # [ doc = " Process some data bytes. It is acceptable that <code>len</code> is zero" ] # [ doc = " (in which case this function does nothing)." ] # [ doc = "" ] # [ doc = " @param cc     the Groestl-512 context" ] # [ doc = " @param data   the input data" ] # [ doc = " @param len    the input data length (in bytes)" ] pub fn groestl512_Update ( cc : * mut libc :: c_void , data : * const libc :: c_void , len : usize ) ; } extern "C" { # [ doc = " Terminate the current Groestl-512 computation and output the result into" ] # [ doc = " the provided buffer. The destination buffer must be wide enough to" ] # [ doc = " accomodate the result (64 bytes). The context is automatically" ] # [ doc = " reinitialized." ] # [ doc = "" ] # [ doc = " @param cc    the Groestl-512 context" ] # [ doc = " @param dst   the destination buffer" ] pub fn groestl512_Final ( cc : * mut libc :: c_void , dst : * mut libc :: c_void ) ; } extern "C" { pub fn groestl512_DoubleTrunc ( cc : * mut libc :: c_void , dst : * mut libc :: c_void ) ; } impl blake2b_constant { pub const BLAKE2B_KEYBYTES : blake2b_constant = blake2b_constant :: BLAKE2B_OUTBYTES ; } impl blake2b_constant { pub const BLAKE2B_PERSONALBYTES : blake2b_constant = blake2b_constant :: BLAKE2B_SALTBYTES ; } # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum blake2b_constant { BLAKE2B_BLOCKBYTES = 128 , BLAKE2B_OUTBYTES = 64 , BLAKE2B_SALTBYTES = 16 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct __blake2b_state { pub h : [ u64 ; 8usize ] , pub t : [ u64 ; 2usize ] , pub f : [ u64 ; 2usize ] , pub buf : [ u8 ; 128usize ] , pub buflen : usize , pub outlen : usize , pub last_node : u8 , } # [ test ] fn bindgen_test_layout___blake2b_state ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __blake2b_state > ( ) , 248usize , concat ! ( "Size of: " , stringify ! ( __blake2b_state ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __blake2b_state > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __blake2b_state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __blake2b_state > ( ) ) ) . h as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __blake2b_state ) , "::" , stringify ! ( h ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __blake2b_state > ( ) ) ) . t as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( __blake2b_state ) , "::" , stringify ! ( t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __blake2b_state > ( ) ) ) . f as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( __blake2b_state ) , "::" , stringify ! ( f ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __blake2b_state > ( ) ) ) . buf as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( __blake2b_state ) , "::" , stringify ! ( buf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __blake2b_state > ( ) ) ) . buflen as * const _ as usize } , 224usize , concat ! ( "Offset of field: " , stringify ! ( __blake2b_state ) , "::" , stringify ! ( buflen ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __blake2b_state > ( ) ) ) . outlen as * const _ as usize } , 232usize , concat ! ( "Offset of field: " , stringify ! ( __blake2b_state ) , "::" , stringify ! ( outlen ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __blake2b_state > ( ) ) ) . last_node as * const _ as usize } , 240usize , concat ! ( "Offset of field: " , stringify ! ( __blake2b_state ) , "::" , stringify ! ( last_node ) ) ) ; } impl :: core :: fmt :: Debug for __blake2b_state { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "__blake2b_state {{ h: {:?}, t: {:?}, f: {:?}, buf: [...], buflen: {:?}, outlen: {:?}, last_node: {:?} }}" , self . h , self . t , self . f , self . buflen , self . outlen , self . last_node ) } } pub type blake2b_state = __blake2b_state ; extern "C" { pub fn blake2b_Init ( S : * mut blake2b_state , outlen : usize ) -> libc :: c_int ; } extern "C" { pub fn blake2b_InitKey ( S : * mut blake2b_state , outlen : usize , key : * const libc :: c_void , keylen : usize ) -> libc :: c_int ; } extern "C" { pub fn blake2b_InitPersonal ( S : * mut blake2b_state , outlen : usize , personal : * const libc :: c_void , personal_len : usize ) -> libc :: c_int ; } extern "C" { pub fn blake2b_Update ( S : * mut blake2b_state , pin : * const libc :: c_void , inlen : usize ) -> libc :: c_int ; } extern "C" { pub fn blake2b_Final ( S : * mut blake2b_state , out : * mut libc :: c_void , outlen : usize ) -> libc :: c_int ; } extern "C" { pub fn blake2b ( msg : * const u8 , msg_len : u32 , out : * mut libc :: c_void , outlen : usize ) -> libc :: c_int ; } extern "C" { pub fn blake2b_Key ( msg : * const u8 , msg_len : u32 , key : * const libc :: c_void , keylen : usize , out : * mut libc :: c_void , outlen : usize ) -> libc :: c_int ; } # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum HasherType { HASHER_SHA2 = 0 , HASHER_SHA2D = 1 , HASHER_SHA2_RIPEMD = 2 , HASHER_SHA3 = 3 , HASHER_SHA3K = 4 , HASHER_BLAKE = 5 , HASHER_BLAKED = 6 , HASHER_BLAKE_RIPEMD = 7 , HASHER_GROESTLD_TRUNC = 8 , HASHER_OVERWINTER_PREVOUTS = 9 , HASHER_OVERWINTER_SEQUENCE = 10 , HASHER_OVERWINTER_OUTPUTS = 11 , HASHER_OVERWINTER_PREIMAGE = 12 , HASHER_SAPLING_PREIMAGE = 13 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct Hasher { pub type_ : HasherType , pub ctx : Hasher__bindgen_ty_1 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union Hasher__bindgen_ty_1 { pub sha2 : SHA256_CTX , pub sha3 : SHA3_CTX , pub blake : BLAKE256_CTX , pub groestl : GROESTL512_CTX , pub blake2b : blake2b_state , _bindgen_union_align : [ u64 ; 50usize ] , } # [ test ] fn bindgen_test_layout_Hasher__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < Hasher__bindgen_ty_1 > ( ) , 400usize , concat ! ( "Size of: " , stringify ! ( Hasher__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < Hasher__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( Hasher__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Hasher__bindgen_ty_1 > ( ) ) ) . sha2 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Hasher__bindgen_ty_1 ) , "::" , stringify ! ( sha2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Hasher__bindgen_ty_1 > ( ) ) ) . sha3 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Hasher__bindgen_ty_1 ) , "::" , stringify ! ( sha3 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Hasher__bindgen_ty_1 > ( ) ) ) . blake as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Hasher__bindgen_ty_1 ) , "::" , stringify ! ( blake ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Hasher__bindgen_ty_1 > ( ) ) ) . groestl as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Hasher__bindgen_ty_1 ) , "::" , stringify ! ( groestl ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Hasher__bindgen_ty_1 > ( ) ) ) . blake2b as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Hasher__bindgen_ty_1 ) , "::" , stringify ! ( blake2b ) ) ) ; } impl :: core :: fmt :: Debug for Hasher__bindgen_ty_1 { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "Hasher__bindgen_ty_1 {{ union }}" ) } } # [ test ] fn bindgen_test_layout_Hasher ( ) { assert_eq ! ( :: core :: mem :: size_of :: < Hasher > ( ) , 408usize , concat ! ( "Size of: " , stringify ! ( Hasher ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < Hasher > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( Hasher ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Hasher > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Hasher ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Hasher > ( ) ) ) . ctx as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( Hasher ) , "::" , stringify ! ( ctx ) ) ) ; } impl :: core :: fmt :: Debug for Hasher { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "Hasher {{ type: {:?}, ctx: {:?} }}" , self . type_ , self . ctx ) } } extern "C" { pub fn hasher_Init ( hasher : * mut Hasher , type_ : HasherType ) ; } extern "C" { pub fn hasher_Reset ( hasher : * mut Hasher ) ; } extern "C" { pub fn hasher_Update ( hasher : * mut Hasher , data : * const u8 , length : usize ) ; } extern "C" { pub fn hasher_Final ( hasher : * mut Hasher , hash : * mut u8 ) ; } extern "C" { pub fn hasher_Raw ( type_ : HasherType , data : * const u8 , length : usize , hash : * mut u8 ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct curve_point { pub x : bignum256 , pub y : bignum256 , } # [ test ] fn bindgen_test_layout_curve_point ( ) { assert_eq ! ( :: core :: mem :: size_of :: < curve_point > ( ) , 72usize , concat ! ( "Size of: " , stringify ! ( curve_point ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < curve_point > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( curve_point ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < curve_point > ( ) ) ) . x as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( curve_point ) , "::" , stringify ! ( x ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < curve_point > ( ) ) ) . y as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( curve_point ) , "::" , stringify ! ( y ) ) ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct ecdsa_curve { pub prime : bignum256 , pub G : curve_point , pub order : bignum256 , pub order_half : bignum256 , pub a : libc :: c_int , pub b : bignum256 , pub cp : [ [ curve_point ; 8usize ] ; 64usize ] , } # [ test ] fn bindgen_test_layout_ecdsa_curve ( ) { assert_eq ! ( :: core :: mem :: size_of :: < ecdsa_curve > ( ) , 37084usize , concat ! ( "Size of: " , stringify ! ( ecdsa_curve ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < ecdsa_curve > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( ecdsa_curve ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ecdsa_curve > ( ) ) ) . prime as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ecdsa_curve ) , "::" , stringify ! ( prime ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ecdsa_curve > ( ) ) ) . G as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( ecdsa_curve ) , "::" , stringify ! ( G ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ecdsa_curve > ( ) ) ) . order as * const _ as usize } , 108usize , concat ! ( "Offset of field: " , stringify ! ( ecdsa_curve ) , "::" , stringify ! ( order ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ecdsa_curve > ( ) ) ) . order_half as * const _ as usize } , 144usize , concat ! ( "Offset of field: " , stringify ! ( ecdsa_curve ) , "::" , stringify ! ( order_half ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ecdsa_curve > ( ) ) ) . a as * const _ as usize } , 180usize , concat ! ( "Offset of field: " , stringify ! ( ecdsa_curve ) , "::" , stringify ! ( a ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ecdsa_curve > ( ) ) ) . b as * const _ as usize } , 184usize , concat ! ( "Offset of field: " , stringify ! ( ecdsa_curve ) , "::" , stringify ! ( b ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ecdsa_curve > ( ) ) ) . cp as * const _ as usize } , 220usize , concat ! ( "Offset of field: " , stringify ! ( ecdsa_curve ) , "::" , stringify ! ( cp ) ) ) ; } impl :: core :: fmt :: Debug for ecdsa_curve { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "ecdsa_curve {{ prime: {:?}, G: {:?}, order: {:?}, order_half: {:?}, a: {:?}, b: {:?}, cp: [...] }}" , self . prime , self . G , self . order , self . order_half , self . a , self . b ) } } extern "C" { pub fn point_copy ( cp1 : * const curve_point , cp2 : * mut curve_point ) ; } extern "C" { pub fn point_add ( curve : * const ecdsa_curve , cp1 : * const curve_point , cp2 : * mut curve_point ) ; } extern "C" { pub fn point_double ( curve : * const ecdsa_curve , cp : * mut curve_point ) ; } extern "C" { pub fn point_multiply ( curve : * const ecdsa_curve , k : * const bignum256 , p : * const curve_point , res : * mut curve_point ) ; } extern "C" { pub fn point_set_infinity ( p : * mut curve_point ) ; } extern "C" { pub fn point_is_infinity ( p : * const curve_point ) -> libc :: c_int ; } extern "C" { pub fn point_is_equal ( p : * const curve_point , q : * const curve_point ) -> libc :: c_int ; } extern "C" { pub fn point_is_negative_of ( p : * const curve_point , q : * const curve_point ) -> libc :: c_int ; } extern "C" { pub fn scalar_multiply ( curve : * const ecdsa_curve , k : * const bignum256 , res : * mut curve_point ) ; } extern "C" { pub fn ecdh_multiply ( curve : * const ecdsa_curve , priv_key : * const u8 , pub_key : * const u8 , session_key : * mut u8 ) -> libc :: c_int ; } extern "C" { pub fn uncompress_coords ( curve : * const ecdsa_curve , odd : u8 , x : * const bignum256 , y : * mut bignum256 ) ; } extern "C" { pub fn ecdsa_uncompress_pubkey ( curve : * const ecdsa_curve , pub_key : * const u8 , uncompressed : * mut u8 ) -> libc :: c_int ; } extern "C" { pub fn ecdsa_sign ( curve : * const ecdsa_curve , hasher_sign : HasherType , priv_key : * const u8 , msg : * const u8 , msg_len : u32 , sig : * mut u8 , pby : * mut u8 , is_canonical : :: core :: option :: Option < unsafe extern "C" fn ( by : u8 , sig : * mut u8 ) -> libc :: c_int > ) -> libc :: c_int ; } extern "C" { pub fn ecdsa_sign_digest ( curve : * const ecdsa_curve , priv_key : * const u8 , digest : * const u8 , sig : * mut u8 , pby : * mut u8 , is_canonical : :: core :: option :: Option < unsafe extern "C" fn ( by : u8 , sig : * mut u8 ) -> libc :: c_int > ) -> libc :: c_int ; } extern "C" { pub fn ecdsa_get_public_key33 ( curve : * const ecdsa_curve , priv_key : * const u8 , pub_key : * mut u8 ) ; } extern "C" { pub fn ecdsa_get_public_key65 ( curve : * const ecdsa_curve , priv_key : * const u8 , pub_key : * mut u8 ) ; } extern "C" { pub fn ecdsa_get_pubkeyhash ( pub_key : * const u8 , hasher_pubkey : HasherType , pubkeyhash : * mut u8 ) ; } extern "C" { pub fn ecdsa_get_address_raw ( pub_key : * const u8 , version : u32 , hasher_pubkey : HasherType , addr_raw : * mut u8 ) ; } extern "C" { pub fn ecdsa_get_address ( pub_key : * const u8 , version : u32 , hasher_pubkey : HasherType , hasher_base58 : HasherType , addr : * mut libc :: c_char , addrsize : libc :: c_int ) ; } extern "C" { pub fn ecdsa_get_address_segwit_p2sh_raw ( pub_key : * const u8 , version : u32 , hasher_pubkey : HasherType , addr_raw : * mut u8 ) ; } extern "C" { pub fn ecdsa_get_address_segwit_p2sh ( pub_key : * const u8 , version : u32 , hasher_pubkey : HasherType , hasher_base58 : HasherType , addr : * mut libc :: c_char , addrsize : libc :: c_int ) ; } extern "C" { pub fn ecdsa_get_wif ( priv_key : * const u8 , version : u32 , hasher_base58 : HasherType , wif : * mut libc :: c_char , wifsize : libc :: c_int ) ; } extern "C" { pub fn ecdsa_address_decode ( addr : * const libc :: c_char , version : u32 , hasher_base58 : HasherType , out : * mut u8 ) -> libc :: c_int ; } extern "C" { pub fn ecdsa_read_pubkey ( curve : * const ecdsa_curve , pub_key : * const u8 , pub_ : * mut curve_point ) -> libc :: c_int ; } extern "C" { pub fn ecdsa_validate_pubkey ( curve : * const ecdsa_curve , pub_ : * const curve_point ) -> libc :: c_int ; } extern "C" { pub fn ecdsa_verify ( curve : * const ecdsa_curve , hasher_sign : HasherType , pub_key : * const u8 , sig : * const u8 , msg : * const u8 , msg_len : u32 ) -> libc :: c_int ; } extern "C" { pub fn ecdsa_verify_digest ( curve : * const ecdsa_curve , pub_key : * const u8 , sig : * const u8 , digest : * const u8 ) -> libc :: c_int ; } extern "C" { pub fn ecdsa_recover_pub_from_sig ( curve : * const ecdsa_curve , pub_key : * mut u8 , sig : * const u8 , digest : * const u8 , recid : libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn ecdsa_sig_to_der ( sig : * const u8 , der : * mut u8 ) -> libc :: c_int ; } pub type ed25519_signature = [ libc :: c_uchar ; 64usize ] ; pub type ed25519_public_key = [ libc :: c_uchar ; 32usize ] ; pub type ed25519_secret_key = [ libc :: c_uchar ; 32usize ] ; pub type curve25519_key = [ libc :: c_uchar ; 32usize ] ; pub type ed25519_cosi_signature = [ libc :: c_uchar ; 32usize ] ; extern "C" { pub fn ed25519_publickey ( sk : * mut libc :: c_uchar , pk : * mut libc :: c_uchar ) ; } extern "C" { pub fn ed25519_sign_open ( m : * const libc :: c_uchar , mlen : usize , pk : * mut libc :: c_uchar , RS : * mut libc :: c_uchar ) -> libc :: c_int ; } extern "C" { pub fn ed25519_sign ( m : * const libc :: c_uchar , mlen : usize , sk : * mut libc :: c_uchar , pk : * mut libc :: c_uchar , RS : * mut libc :: c_uchar ) ; } extern "C" { pub fn ed25519_scalarmult ( res : * mut libc :: c_uchar , sk : * mut libc :: c_uchar , pk : * mut libc :: c_uchar ) -> libc :: c_int ; } extern "C" { pub fn curve25519_scalarmult ( mypublic : * mut libc :: c_uchar , secret : * mut libc :: c_uchar , basepoint : * mut libc :: c_uchar ) ; } extern "C" { pub fn curve25519_scalarmult_basepoint ( mypublic : * mut libc :: c_uchar , secret : * mut libc :: c_uchar ) ; } extern "C" { pub fn ed25519_cosi_combine_publickeys ( res : * mut libc :: c_uchar , pks : * mut ed25519_public_key , n : usize ) -> libc :: c_int ; } extern "C" { pub fn ed25519_cosi_combine_signatures ( res : * mut libc :: c_uchar , R : * mut libc :: c_uchar , sigs : * mut ed25519_cosi_signature , n : usize ) ; } extern "C" { pub fn ed25519_cosi_sign ( m : * const libc :: c_uchar , mlen : usize , key : * mut libc :: c_uchar , nonce : * mut libc :: c_uchar , R : * mut libc :: c_uchar , pk : * mut libc :: c_uchar , sig : * mut libc :: c_uchar ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct curve_info { pub bip32_name : * const libc :: c_char , pub params : * const ecdsa_curve , pub hasher_base58 : HasherType , pub hasher_sign : HasherType , pub hasher_pubkey : HasherType , pub hasher_script : HasherType , } # [ test ] fn bindgen_test_layout_curve_info ( ) { assert_eq ! ( :: core :: mem :: size_of :: < curve_info > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( curve_info ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < curve_info > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( curve_info ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < curve_info > ( ) ) ) . bip32_name as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( curve_info ) , "::" , stringify ! ( bip32_name ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < curve_info > ( ) ) ) . params as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( curve_info ) , "::" , stringify ! ( params ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < curve_info > ( ) ) ) . hasher_base58 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( curve_info ) , "::" , stringify ! ( hasher_base58 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < curve_info > ( ) ) ) . hasher_sign as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( curve_info ) , "::" , stringify ! ( hasher_sign ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < curve_info > ( ) ) ) . hasher_pubkey as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( curve_info ) , "::" , stringify ! ( hasher_pubkey ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < curve_info > ( ) ) ) . hasher_script as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( curve_info ) , "::" , stringify ! ( hasher_script ) ) ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct HDNode { pub depth : u32 , pub child_num : u32 , pub chain_code : [ u8 ; 32usize ] , pub private_key : [ u8 ; 32usize ] , pub private_key_extension : [ u8 ; 32usize ] , pub public_key : [ u8 ; 33usize ] , pub curve : * const curve_info , } # [ test ] fn bindgen_test_layout_HDNode ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HDNode > ( ) , 152usize , concat ! ( "Size of: " , stringify ! ( HDNode ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HDNode > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HDNode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HDNode > ( ) ) ) . depth as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HDNode ) , "::" , stringify ! ( depth ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HDNode > ( ) ) ) . child_num as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HDNode ) , "::" , stringify ! ( child_num ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HDNode > ( ) ) ) . chain_code as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HDNode ) , "::" , stringify ! ( chain_code ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HDNode > ( ) ) ) . private_key as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( HDNode ) , "::" , stringify ! ( private_key ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HDNode > ( ) ) ) . private_key_extension as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( HDNode ) , "::" , stringify ! ( private_key_extension ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HDNode > ( ) ) ) . public_key as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( HDNode ) , "::" , stringify ! ( public_key ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HDNode > ( ) ) ) . curve as * const _ as usize } , 144usize , concat ! ( "Offset of field: " , stringify ! ( HDNode ) , "::" , stringify ! ( curve ) ) ) ; } impl :: core :: fmt :: Debug for HDNode { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "HDNode {{ depth: {:?}, child_num: {:?}, chain_code: [...], private_key: [...], private_key_extension: [...], public_key: [...], curve: {:?} }}" , self . depth , self . child_num , self . curve ) } } extern "C" { pub fn hdnode_from_xpub ( depth : u32 , child_num : u32 , chain_code : * const u8 , public_key : * const u8 , curve : * const libc :: c_char , out : * mut HDNode ) -> libc :: c_int ; } extern "C" { pub fn hdnode_from_xprv ( depth : u32 , child_num : u32 , chain_code : * const u8 , private_key : * const u8 , curve : * const libc :: c_char , out : * mut HDNode ) -> libc :: c_int ; } extern "C" { pub fn hdnode_from_seed ( seed : * const u8 , seed_len : libc :: c_int , curve : * const libc :: c_char , out : * mut HDNode ) -> libc :: c_int ; } extern "C" { pub fn hdnode_private_ckd ( inout : * mut HDNode , i : u32 ) -> libc :: c_int ; } extern "C" { pub fn hdnode_public_ckd_cp ( curve : * const ecdsa_curve , parent : * const curve_point , parent_chain_code : * const u8 , i : u32 , child : * mut curve_point , child_chain_code : * mut u8 ) -> libc :: c_int ; } extern "C" { pub fn hdnode_public_ckd ( inout : * mut HDNode , i : u32 ) -> libc :: c_int ; } extern "C" { pub fn hdnode_public_ckd_address_optimized ( pub_ : * const curve_point , chain_code : * const u8 , i : u32 , version : u32 , hasher_pubkey : HasherType , hasher_base58 : HasherType , addr : * mut libc :: c_char , addrsize : libc :: c_int , addrformat : libc :: c_int ) ; } extern "C" { pub fn hdnode_private_ckd_cached ( inout : * mut HDNode , i : * const u32 , i_count : usize , fingerprint : * mut u32 ) -> libc :: c_int ; } extern "C" { pub fn hdnode_fingerprint ( node : * mut HDNode ) -> u32 ; } extern "C" { pub fn hdnode_fill_public_key ( node : * mut HDNode ) ; } extern "C" { pub fn hdnode_sign ( node : * mut HDNode , msg : * const u8 , msg_len : u32 , hasher_sign : HasherType , sig : * mut u8 , pby : * mut u8 , is_canonical : :: core :: option :: Option < unsafe extern "C" fn ( by : u8 , sig : * mut u8 ) -> libc :: c_int > ) -> libc :: c_int ; } extern "C" { pub fn hdnode_sign_digest ( node : * mut HDNode , digest : * const u8 , sig : * mut u8 , pby : * mut u8 , is_canonical : :: core :: option :: Option < unsafe extern "C" fn ( by : u8 , sig : * mut u8 ) -> libc :: c_int > ) -> libc :: c_int ; } extern "C" { pub fn hdnode_get_shared_key ( node : * const HDNode , peer_public_key : * const u8 , session_key : * mut u8 , result_size : * mut libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn hdnode_serialize_public ( node : * const HDNode , fingerprint : u32 , version : u32 , str : * mut libc :: c_char , strsize : libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn hdnode_serialize_private ( node : * const HDNode , fingerprint : u32 , version : u32 , str : * mut libc :: c_char , strsize : libc :: c_int ) -> libc :: c_int ; } extern "C" { pub fn hdnode_deserialize ( str : * const libc :: c_char , version_public : u32 , version_private : u32 , curve : * const libc :: c_char , node : * mut HDNode , fingerprint : * mut u32 ) -> libc :: c_int ; } extern "C" { pub fn hdnode_get_address_raw ( node : * mut HDNode , version : u32 , addr_raw : * mut u8 ) ; } extern "C" { pub fn hdnode_get_address ( node : * mut HDNode , version : u32 , addr : * mut libc :: c_char , addrsize : libc :: c_int ) ; } extern "C" { pub fn get_curve_by_name ( curve_name : * const libc :: c_char ) -> * const curve_info ; } extern "C" { pub static secp256k1 : ecdsa_curve ; } extern "C" { pub static secp256k1_info : curve_info ; } extern "C" { pub static secp256k1_decred_info : curve_info ; } extern "C" { pub static secp256k1_groestl_info : curve_info ; } extern "C" { pub static secp256k1_smart_info : curve_info ; } extern "C" { pub fn eth_sign ( pk : * mut libc :: c_void , type_ : d_signature_type_t , message : bytes_t , account : bytes_t , dst : * mut u8 ) -> in3_ret_t :: Type ; } extern "C" { pub fn sign_tx ( tx : * mut d_token_t , ctx : * mut in3_ctx_t ) -> bytes_t ; } extern "C" { # [ doc = " simply signer with one private key." ] # [ doc = "" ] # [ doc = " since the pk pointting to the 32 byte private key is not cloned, please make sure, you manage memory allocation correctly!" ] pub fn eth_set_pk_signer ( in3 : * mut in3_t , pk : * mut u8 ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " simply signer with one private key as hex." ] pub fn eth_set_pk_signer_hex ( in3 : * mut in3_t , key : * mut libc :: c_char ) -> * mut u8 ; } # [ doc = " a 32 byte long integer used to store ethereum-numbers." ] # [ doc = "" ] # [ doc = " use the as_long() or as_double() to convert this to a useable number." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct uint256_t { pub data : [ u8 ; 32usize ] , } # [ test ] fn bindgen_test_layout_uint256_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < uint256_t > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( uint256_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < uint256_t > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( uint256_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < uint256_t > ( ) ) ) . data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( uint256_t ) , "::" , stringify ! ( data ) ) ) ; } extern "C" { pub fn as_double ( d : uint256_t ) -> u128 ; } extern "C" { pub fn as_long ( d : uint256_t ) -> u64 ; } extern "C" { pub fn to_uint256 ( value : u64 ) -> uint256_t ; } extern "C" { pub fn decrypt_key ( key_data : * mut d_token_t , password : * mut libc :: c_char , dst : * mut u8 ) -> in3_ret_t :: Type ; } extern "C" { pub fn to_checksum ( adr : * mut u8 , chain_id : chain_id_t , out : * mut libc :: c_char ) -> in3_ret_t :: Type ; } # [ doc = " function to set error. Will only be called internally." ] # [ doc = " default implementation is NOT MT safe!" ] pub type set_error_fn = :: core :: option :: Option < unsafe extern "C" fn ( err : libc :: c_int , msg : * const libc :: c_char ) > ; extern "C" { pub fn api_set_error_fn ( fn_ : set_error_fn ) ; } # [ doc = " function to get last error message." ] # [ doc = " default implementation is NOT MT safe!" ] pub type get_error_fn = :: core :: option :: Option < unsafe extern "C" fn ( ) -> * mut libc :: c_char > ; extern "C" { pub fn api_get_error_fn ( fn_ : get_error_fn ) ; } extern "C" { # [ doc = " returns current error or null if all is ok" ] pub fn api_last_error ( ) -> * mut libc :: c_char ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct opt_uint64_t { pub value : u64 , pub defined : bool , } # [ test ] fn bindgen_test_layout_opt_uint64_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < opt_uint64_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( opt_uint64_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < opt_uint64_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( opt_uint64_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < opt_uint64_t > ( ) ) ) . value as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( opt_uint64_t ) , "::" , stringify ! ( value ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < opt_uint64_t > ( ) ) ) . defined as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( opt_uint64_t ) , "::" , stringify ! ( defined ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct opt_bytes_t { pub value : bytes_t , pub defined : bool , } # [ test ] fn bindgen_test_layout_opt_bytes_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < opt_bytes_t > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( opt_bytes_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < opt_bytes_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( opt_bytes_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < opt_bytes_t > ( ) ) ) . value as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( opt_bytes_t ) , "::" , stringify ! ( value ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < opt_bytes_t > ( ) ) ) . defined as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( opt_bytes_t ) , "::" , stringify ! ( defined ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct opt_address_t { pub value : address_t , pub defined : bool , } # [ test ] fn bindgen_test_layout_opt_address_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < opt_address_t > ( ) , 21usize , concat ! ( "Size of: " , stringify ! ( opt_address_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < opt_address_t > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( opt_address_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < opt_address_t > ( ) ) ) . value as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( opt_address_t ) , "::" , stringify ! ( value ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < opt_address_t > ( ) ) ) . defined as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( opt_address_t ) , "::" , stringify ! ( defined ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct opt_uint256_t { pub value : uint256_t , pub defined : bool , } # [ test ] fn bindgen_test_layout_opt_uint256_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < opt_uint256_t > ( ) , 33usize , concat ! ( "Size of: " , stringify ! ( opt_uint256_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < opt_uint256_t > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( opt_uint256_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < opt_uint256_t > ( ) ) ) . value as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( opt_uint256_t ) , "::" , stringify ! ( value ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < opt_uint256_t > ( ) ) ) . defined as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( opt_uint256_t ) , "::" , stringify ! ( defined ) ) ) ; } # [ doc = " A transaction" ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct eth_tx { # [ doc = "< the blockhash" ] pub hash : bytes32_t , # [ doc = "< hash of ther containnig block" ] pub block_hash : bytes32_t , # [ doc = "< number of the containing block" ] pub block_number : u64 , # [ doc = "< sender of the tx" ] pub from : address_t , # [ doc = "< gas send along" ] pub gas : u64 , # [ doc = "< gas price used" ] pub gas_price : u64 , # [ doc = "< data send along with the transaction" ] pub data : bytes_t , # [ doc = "< nonce of the transaction" ] pub nonce : u64 , # [ doc = "< receiver of the address 0x0000.. -Address is used for contract creation." ] pub to : address_t , # [ doc = "< the value in wei send" ] pub value : uint256_t , # [ doc = "< the transaction index" ] pub transaction_index : libc :: c_int , # [ doc = "< signature of the transaction" ] pub signature : [ u8 ; 65usize ] , } # [ test ] fn bindgen_test_layout_eth_tx ( ) { assert_eq ! ( :: core :: mem :: size_of :: < eth_tx > ( ) , 264usize , concat ! ( "Size of: " , stringify ! ( eth_tx ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < eth_tx > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( eth_tx ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx > ( ) ) ) . hash as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx ) , "::" , stringify ! ( hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx > ( ) ) ) . block_hash as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx ) , "::" , stringify ! ( block_hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx > ( ) ) ) . block_number as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx ) , "::" , stringify ! ( block_number ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx > ( ) ) ) . from as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx ) , "::" , stringify ! ( from ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx > ( ) ) ) . gas as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx ) , "::" , stringify ! ( gas ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx > ( ) ) ) . gas_price as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx ) , "::" , stringify ! ( gas_price ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx > ( ) ) ) . data as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx ) , "::" , stringify ! ( data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx > ( ) ) ) . nonce as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx ) , "::" , stringify ! ( nonce ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx > ( ) ) ) . to as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx ) , "::" , stringify ! ( to ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx > ( ) ) ) . value as * const _ as usize } , 156usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx ) , "::" , stringify ! ( value ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx > ( ) ) ) . transaction_index as * const _ as usize } , 188usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx ) , "::" , stringify ! ( transaction_index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx > ( ) ) ) . signature as * const _ as usize } , 192usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx ) , "::" , stringify ! ( signature ) ) ) ; } impl :: core :: fmt :: Debug for eth_tx { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "eth_tx {{ hash: [...], block_hash: [...], block_number: {:?}, from: {:?}, gas: {:?}, gas_price: {:?}, data: {:?}, nonce: {:?}, to: {:?}, value: {:?}, transaction_index: {:?}, signature: [...] }}" , self . block_number , self . from , self . gas , self . gas_price , self . data , self . nonce , self . to , self . value , self . transaction_index ) } } # [ doc = " A transaction" ] pub type eth_tx_t = eth_tx ; # [ doc = " An Ethereum Block" ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct eth_block { # [ doc = "< the blockNumber" ] pub number : u64 , # [ doc = "< the blockhash" ] pub hash : bytes32_t , # [ doc = "< gas used by all the transactions" ] pub gasUsed : u64 , # [ doc = "< gasLimit" ] pub gasLimit : u64 , # [ doc = "< the author of the block." ] pub author : address_t , # [ doc = "< the difficulty of the block." ] pub difficulty : uint256_t , # [ doc = "< the extra_data of the block." ] pub extra_data : bytes_t , # [ doc = "< the logsBloom-data" ] pub logsBloom : [ u8 ; 256usize ] , # [ doc = "< the hash of the parent-block" ] pub parent_hash : bytes32_t , # [ doc = "< root hash of the uncle-trie" ] pub sha3_uncles : bytes32_t , # [ doc = "< root hash of the state-trie" ] pub state_root : bytes32_t , # [ doc = "< root of the receipts trie" ] pub receipts_root : bytes32_t , # [ doc = "< root of the transaction trie" ] pub transaction_root : bytes32_t , # [ doc = "< number of transactions in the block" ] pub tx_count : libc :: c_int , # [ doc = "< array of transaction data or NULL if not requested" ] pub tx_data : * mut eth_tx_t , # [ doc = "< array of transaction hashes or NULL if not requested" ] pub tx_hashes : * mut bytes32_t , # [ doc = "< the unix timestamp of the block" ] pub timestamp : u64 , # [ doc = "< sealed fields" ] pub seal_fields : * mut bytes_t , # [ doc = "< number of seal fields" ] pub seal_fields_count : libc :: c_int , } # [ test ] fn bindgen_test_layout_eth_block ( ) { assert_eq ! ( :: core :: mem :: size_of :: < eth_block > ( ) , 592usize , concat ! ( "Size of: " , stringify ! ( eth_block ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < eth_block > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( eth_block ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . number as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( number ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . hash as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . gasUsed as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( gasUsed ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . gasLimit as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( gasLimit ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . author as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( author ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . difficulty as * const _ as usize } , 76usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( difficulty ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . extra_data as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( extra_data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . logsBloom as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( logsBloom ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . parent_hash as * const _ as usize } , 384usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( parent_hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . sha3_uncles as * const _ as usize } , 416usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( sha3_uncles ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . state_root as * const _ as usize } , 448usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( state_root ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . receipts_root as * const _ as usize } , 480usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( receipts_root ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . transaction_root as * const _ as usize } , 512usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( transaction_root ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . tx_count as * const _ as usize } , 544usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( tx_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . tx_data as * const _ as usize } , 552usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( tx_data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . tx_hashes as * const _ as usize } , 560usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( tx_hashes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . timestamp as * const _ as usize } , 568usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( timestamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . seal_fields as * const _ as usize } , 576usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( seal_fields ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_block > ( ) ) ) . seal_fields_count as * const _ as usize } , 584usize , concat ! ( "Offset of field: " , stringify ! ( eth_block ) , "::" , stringify ! ( seal_fields_count ) ) ) ; } impl :: core :: fmt :: Debug for eth_block { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "eth_block {{ number: {:?}, hash: [...], gasUsed: {:?}, gasLimit: {:?}, author: {:?}, difficulty: {:?}, extra_data: {:?}, logsBloom: [...], parent_hash: [...], sha3_uncles: [...], state_root: [...], receipts_root: [...], transaction_root: [...], tx_count: {:?}, tx_data: {:?}, tx_hashes: {:?}, timestamp: {:?}, seal_fields: {:?}, seal_fields_count: {:?} }}" , self . number , self . gasUsed , self . gasLimit , self . author , self . difficulty , self . extra_data , self . tx_count , self . tx_data , self . tx_hashes , self . timestamp , self . seal_fields , self . seal_fields_count ) } } # [ doc = " An Ethereum Block" ] pub type eth_block_t = eth_block ; # [ doc = " A linked list of Ethereum Logs" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct eth_log { # [ doc = "< true when the log was removed, due to a chain reorganization. false if its a valid log" ] pub removed : bool , # [ doc = "< log index position in the block" ] pub log_index : usize , # [ doc = "< transactions index position log was created from" ] pub transaction_index : usize , # [ doc = "< hash of the transactions this log was created from" ] pub transaction_hash : bytes32_t , # [ doc = "< hash of the block where this log was in" ] pub block_hash : bytes32_t , # [ doc = "< the block number where this log was in" ] pub block_number : u64 , # [ doc = "< address from which this log originated" ] pub address : address_t , # [ doc = "< non-indexed arguments of the log" ] pub data : bytes_t , # [ doc = "< array of 0 to 4 32 Bytes DATA of indexed log arguments" ] pub topics : * mut bytes32_t , # [ doc = "< counter for topics" ] pub topic_count : usize , # [ doc = "< pointer to next log in list or NULL" ] pub next : * mut eth_log , } # [ test ] fn bindgen_test_layout_eth_log ( ) { assert_eq ! ( :: core :: mem :: size_of :: < eth_log > ( ) , 160usize , concat ! ( "Size of: " , stringify ! ( eth_log ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < eth_log > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( eth_log ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_log > ( ) ) ) . removed as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( eth_log ) , "::" , stringify ! ( removed ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_log > ( ) ) ) . log_index as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( eth_log ) , "::" , stringify ! ( log_index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_log > ( ) ) ) . transaction_index as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( eth_log ) , "::" , stringify ! ( transaction_index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_log > ( ) ) ) . transaction_hash as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( eth_log ) , "::" , stringify ! ( transaction_hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_log > ( ) ) ) . block_hash as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( eth_log ) , "::" , stringify ! ( block_hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_log > ( ) ) ) . block_number as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( eth_log ) , "::" , stringify ! ( block_number ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_log > ( ) ) ) . address as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( eth_log ) , "::" , stringify ! ( address ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_log > ( ) ) ) . data as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( eth_log ) , "::" , stringify ! ( data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_log > ( ) ) ) . topics as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( eth_log ) , "::" , stringify ! ( topics ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_log > ( ) ) ) . topic_count as * const _ as usize } , 144usize , concat ! ( "Offset of field: " , stringify ! ( eth_log ) , "::" , stringify ! ( topic_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_log > ( ) ) ) . next as * const _ as usize } , 152usize , concat ! ( "Offset of field: " , stringify ! ( eth_log ) , "::" , stringify ! ( next ) ) ) ; } # [ doc = " A linked list of Ethereum Logs" ] pub type eth_log_t = eth_log ; # [ doc = " A transaction receipt" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct eth_tx_receipt { # [ doc = "< the transaction hash" ] pub transaction_hash : bytes32_t , # [ doc = "< the transaction index" ] pub transaction_index : libc :: c_int , # [ doc = "< hash of ther containnig block" ] pub block_hash : bytes32_t , # [ doc = "< number of the containing block" ] pub block_number : u64 , # [ doc = "< total amount of gas used by block" ] pub cumulative_gas_used : u64 , # [ doc = "< amount of gas used by this specific transaction" ] pub gas_used : u64 , # [ doc = "< contract address created (if the transaction was a contract creation) or NULL" ] pub contract_address : * mut bytes_t , # [ doc = "< 1 if transaction succeeded, 0 otherwise." ] pub status : bool , # [ doc = "< array of log objects, which this transaction generated" ] pub logs : * mut eth_log_t , } # [ test ] fn bindgen_test_layout_eth_tx_receipt ( ) { assert_eq ! ( :: core :: mem :: size_of :: < eth_tx_receipt > ( ) , 120usize , concat ! ( "Size of: " , stringify ! ( eth_tx_receipt ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < eth_tx_receipt > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( eth_tx_receipt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx_receipt > ( ) ) ) . transaction_hash as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx_receipt ) , "::" , stringify ! ( transaction_hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx_receipt > ( ) ) ) . transaction_index as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx_receipt ) , "::" , stringify ! ( transaction_index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx_receipt > ( ) ) ) . block_hash as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx_receipt ) , "::" , stringify ! ( block_hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx_receipt > ( ) ) ) . block_number as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx_receipt ) , "::" , stringify ! ( block_number ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx_receipt > ( ) ) ) . cumulative_gas_used as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx_receipt ) , "::" , stringify ! ( cumulative_gas_used ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx_receipt > ( ) ) ) . gas_used as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx_receipt ) , "::" , stringify ! ( gas_used ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx_receipt > ( ) ) ) . contract_address as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx_receipt ) , "::" , stringify ! ( contract_address ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx_receipt > ( ) ) ) . status as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx_receipt ) , "::" , stringify ! ( status ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_tx_receipt > ( ) ) ) . logs as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( eth_tx_receipt ) , "::" , stringify ! ( logs ) ) ) ; } # [ doc = " A transaction receipt" ] pub type eth_tx_receipt_t = eth_tx_receipt ; # [ repr ( u32 ) ] # [ doc = " Abstract type for holding a block number" ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum eth_blknum_def_t { BLK_LATEST = 0 , BLK_EARLIEST = 1 , BLK_PENDING = 2 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct eth_blknum_t { pub __bindgen_anon_1 : eth_blknum_t__bindgen_ty_1 , pub is_u64 : bool , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union eth_blknum_t__bindgen_ty_1 { pub u64 : u64 , pub def : eth_blknum_def_t , _bindgen_union_align : u64 , } # [ test ] fn bindgen_test_layout_eth_blknum_t__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < eth_blknum_t__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( eth_blknum_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < eth_blknum_t__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( eth_blknum_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_blknum_t__bindgen_ty_1 > ( ) ) ) . u64 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( eth_blknum_t__bindgen_ty_1 ) , "::" , stringify ! ( u64 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_blknum_t__bindgen_ty_1 > ( ) ) ) . def as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( eth_blknum_t__bindgen_ty_1 ) , "::" , stringify ! ( def ) ) ) ; } impl :: core :: fmt :: Debug for eth_blknum_t__bindgen_ty_1 { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "eth_blknum_t__bindgen_ty_1 {{ union }}" ) } } # [ test ] fn bindgen_test_layout_eth_blknum_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < eth_blknum_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( eth_blknum_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < eth_blknum_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( eth_blknum_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < eth_blknum_t > ( ) ) ) . is_u64 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( eth_blknum_t ) , "::" , stringify ! ( is_u64 ) ) ) ; } impl :: core :: fmt :: Debug for eth_blknum_t { fn fmt ( & self , f : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { write ! ( f , "eth_blknum_t {{ __bindgen_anon_1: {:?}, is_u64: {:?} }}" , self . __bindgen_anon_1 , self . is_u64 ) } } extern "C" { pub fn eth_getStorageAt ( in3 : * mut in3_t , account : * mut u8 , key : * mut u8 , block : eth_blknum_t ) -> uint256_t ; } extern "C" { pub fn eth_getCode ( in3 : * mut in3_t , account : * mut u8 , block : eth_blknum_t ) -> bytes_t ; } extern "C" { pub fn eth_getBalance ( in3 : * mut in3_t , account : * mut u8 , block : eth_blknum_t ) -> uint256_t ; } extern "C" { pub fn eth_blockNumber ( in3 : * mut in3_t ) -> u64 ; } extern "C" { pub fn eth_gasPrice ( in3 : * mut in3_t ) -> u64 ; } extern "C" { pub fn eth_getBlockByNumber ( in3 : * mut in3_t , number : eth_blknum_t , include_tx : bool ) -> * mut eth_block_t ; } extern "C" { pub fn eth_getBlockByHash ( in3 : * mut in3_t , hash : * mut u8 , include_tx : bool ) -> * mut eth_block_t ; } extern "C" { pub fn eth_getLogs ( in3 : * mut in3_t , fopt : * mut libc :: c_char ) -> * mut eth_log_t ; } extern "C" { pub fn eth_newFilter ( in3 : * mut in3_t , options : * mut json_ctx_t ) -> in3_ret_t :: Type ; } extern "C" { pub fn eth_newBlockFilter ( in3 : * mut in3_t ) -> in3_ret_t :: Type ; } extern "C" { pub fn eth_newPendingTransactionFilter ( in3 : * mut in3_t ) -> in3_ret_t :: Type ; } extern "C" { pub fn eth_uninstallFilter ( in3 : * mut in3_t , id : usize ) -> bool ; } extern "C" { pub fn eth_getFilterChanges ( in3 : * mut in3_t , id : usize , block_hashes : * mut * mut bytes32_t , logs : * mut * mut eth_log_t ) -> in3_ret_t :: Type ; } extern "C" { pub fn eth_getFilterLogs ( in3 : * mut in3_t , id : usize , logs : * mut * mut eth_log_t ) -> in3_ret_t :: Type ; } extern "C" { pub fn eth_chainId ( in3 : * mut in3_t ) -> u64 ; } extern "C" { pub fn eth_getBlockTransactionCountByHash ( in3 : * mut in3_t , hash : * mut u8 ) -> u64 ; } extern "C" { pub fn eth_getBlockTransactionCountByNumber ( in3 : * mut in3_t , block : eth_blknum_t ) -> u64 ; } extern "C" { pub fn eth_call_fn ( in3 : * mut in3_t , contract : * mut u8 , block : eth_blknum_t , fn_sig : * mut libc :: c_char , ... ) -> * mut json_ctx_t ; } extern "C" { pub fn eth_estimate_fn ( in3 : * mut in3_t , contract : * mut u8 , block : eth_blknum_t , fn_sig : * mut libc :: c_char , ... ) -> u64 ; } extern "C" { pub fn eth_getTransactionByHash ( in3 : * mut in3_t , tx_hash : * mut u8 ) -> * mut eth_tx_t ; } extern "C" { pub fn eth_getTransactionByBlockHashAndIndex ( in3 : * mut in3_t , block_hash : * mut u8 , index : usize ) -> * mut eth_tx_t ; } extern "C" { pub fn eth_getTransactionByBlockNumberAndIndex ( in3 : * mut in3_t , block : eth_blknum_t , index : usize ) -> * mut eth_tx_t ; } extern "C" { pub fn eth_getTransactionCount ( in3 : * mut in3_t , address : * mut u8 , block : eth_blknum_t ) -> u64 ; } extern "C" { pub fn eth_getUncleByBlockNumberAndIndex ( in3 : * mut in3_t , block : eth_blknum_t , index : usize ) -> * mut eth_block_t ; } extern "C" { pub fn eth_getUncleCountByBlockHash ( in3 : * mut in3_t , hash : * mut u8 ) -> u64 ; } extern "C" { pub fn eth_getUncleCountByBlockNumber ( in3 : * mut in3_t , block : eth_blknum_t ) -> u64 ; } extern "C" { pub fn eth_sendTransaction ( in3 : * mut in3_t , from : * mut u8 , to : * mut u8 , gas : opt_uint64_t , gas_price : opt_uint64_t , value : opt_uint256_t , data : opt_bytes_t , nonce : opt_uint64_t ) -> * mut bytes_t ; } extern "C" { pub fn eth_sendRawTransaction ( in3 : * mut in3_t , data : bytes_t ) -> * mut bytes_t ; } extern "C" { pub fn eth_getTransactionReceipt ( in3 : * mut in3_t , tx_hash : * mut u8 ) -> * mut eth_tx_receipt_t ; } extern "C" { pub fn eth_wait_for_receipt ( in3 : * mut in3_t , tx_hash : * mut u8 ) -> * mut libc :: c_char ; } extern "C" { pub fn eth_log_free ( log : * mut eth_log_t ) ; } extern "C" { pub fn eth_tx_receipt_free ( txr : * mut eth_tx_receipt_t ) ; } extern "C" { # [ doc = " this function should only be called once and will register the eth-API verifier." ] pub fn in3_register_eth_api ( ) ; } extern "C" { # [ doc = " a transport function using curl." ] # [ doc = "" ] # [ doc = " You can use it by setting the transport-function-pointer in the in3_t->transport to this function:" ] # [ doc = "" ] # [ doc = " ```c" ] # [ doc = " #include <in3/in3_curl.h>" ] # [ doc = " ..." ] # [ doc = " c->transport = send_curl;" ] # [ doc = " ```" ] pub fn send_curl ( req : * mut in3_request_t ) -> in3_ret_t :: Type ; } extern "C" { # [ doc = " registers curl as a default transport." ] pub fn in3_register_curl ( ) ; } extern "C" { pub fn in3_for_chain_auto_init ( chain_id : chain_id_t ) -> * mut in3_t ; } pub type __builtin_va_list = [ __va_list_tag ; 1usize ] ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __va_list_tag { pub gp_offset : libc :: c_uint , pub fp_offset : libc :: c_uint , pub overflow_arg_area : * mut libc :: c_void , pub reg_save_area : * mut libc :: c_void , } # [ test ] fn bindgen_test_layout___va_list_tag ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __va_list_tag > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( __va_list_tag ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __va_list_tag > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __va_list_tag ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __va_list_tag > ( ) ) ) . gp_offset as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __va_list_tag ) , "::" , stringify ! ( gp_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __va_list_tag > ( ) ) ) . fp_offset as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( __va_list_tag ) , "::" , stringify ! ( fp_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __va_list_tag > ( ) ) ) . overflow_arg_area as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( __va_list_tag ) , "::" , stringify ! ( overflow_arg_area ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __va_list_tag > ( ) ) ) . reg_save_area as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( __va_list_tag ) , "::" , stringify ! ( reg_save_area ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __locale_data { pub _address : u8 , }