plumber-rs 0.1.2

The basic library for Plumber servlet written in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
/* automatically generated by rust-bindgen */

#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage, Align>
where
    Storage: AsRef<[u8]> + AsMut<[u8]>,
{
    storage: Storage,
    align: [Align; 0],
}

impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align>
where
    Storage: AsRef<[u8]> + AsMut<[u8]>,
{
    #[inline]
    pub fn new(storage: Storage) -> Self {
        Self { storage, align: [] }
    }

    #[inline]
    pub fn get_bit(&self, index: usize) -> bool {
        debug_assert!(index / 8 < self.storage.as_ref().len());

        let byte_index = index / 8;
        let byte = self.storage.as_ref()[byte_index];

        let bit_index = if cfg!(target_endian = "big") {
            7 - (index % 8)
        } else {
            index % 8
        };

        let mask = 1 << bit_index;

        byte & mask == mask
    }

    #[inline]
    pub fn set_bit(&mut self, index: usize, val: bool) {
        debug_assert!(index / 8 < self.storage.as_ref().len());

        let byte_index = index / 8;
        let byte = &mut self.storage.as_mut()[byte_index];

        let bit_index = if cfg!(target_endian = "big") {
            7 - (index % 8)
        } else {
            index % 8
        };

        let mask = 1 << bit_index;
        if val {
            *byte |= mask;
        } else {
            *byte &= !mask;
        }
    }

    #[inline]
    pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());

        let mut val = 0;

        for i in 0..(bit_width as usize) {
            if self.get_bit(i + bit_offset) {
                let index = if cfg!(target_endian = "big") {
                    bit_width as usize - 1 - i
                } else {
                    i
                };
                val |= 1 << index;
            }
        }

        val
    }

    #[inline]
    pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());

        for i in 0..(bit_width as usize) {
            let mask = 1 << i;
            let val_bit_is_set = val & mask == mask;
            let index = if cfg!(target_endian = "big") {
                bit_width as usize - 1 - i
            } else {
                i
            };
            self.set_bit(index + bit_offset, val_bit_is_set);
        }
    }
}
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>);
impl<T> __IncompleteArrayField<T> {
    #[inline]
    pub fn new() -> Self {
        __IncompleteArrayField(::std::marker::PhantomData)
    }
    #[inline]
    pub unsafe fn as_ptr(&self) -> *const T {
        ::std::mem::transmute(self)
    }
    #[inline]
    pub unsafe fn as_mut_ptr(&mut self) -> *mut T {
        ::std::mem::transmute(self)
    }
    #[inline]
    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
        ::std::slice::from_raw_parts(self.as_ptr(), len)
    }
    #[inline]
    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
    }
}
impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
    fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        fmt.write_str("__IncompleteArrayField")
    }
}
impl<T> ::std::clone::Clone for __IncompleteArrayField<T> {
    #[inline]
    fn clone(&self) -> Self {
        Self::new()
    }
}
impl<T> ::std::marker::Copy for __IncompleteArrayField<T> {}
pub const _STDINT_H: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
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 _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 = 201505;
pub const __STDC_NO_THREADS__: u32 = 1;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 23;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_WORDSIZE: u32 = 64;
pub const _BITS_WCHAR_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 __GNUC_VA_LIST: u32 = 1;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_GET_FLAGS: u32 = 4278190080;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_SET_FLAG: u32 = 4278190081;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_CLR_FLAG: u32 = 4278190082;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_EOM: u32 = 4278190083;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_PUSH_STATE: u32 = 4278190084;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_POP_STATE: u32 = 4278190085;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_INVOKE: u32 = 4278190086;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_READHDR: u32 = 4278190087;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_WRITEHDR: u32 = 4278190088;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_MODPATH: u32 = 4278190089;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_GET_HDR_BUF: u32 = 4278190090;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_GET_DATA_BUF: u32 = 4278190091;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_PUT_DATA_BUF: u32 = 4278190092;
pub const RUNTIME_API_PIPE_CNTL_OPCODE_NOP: u32 = 4294967294;
pub const RUNTIME_API_ASYNC_CNTL_OPCODE_SET_WAIT: u32 = 0;
pub const RUNTIME_API_ASYNC_CNTL_OPCODE_NOTIFY_WAIT: u32 = 1;
pub const RUNTIME_API_ASYNC_CNTL_OPCODE_RETCODE: u32 = 2;
pub const RUNTIME_API_ASYNC_CNTL_OPCODE_CANCEL: u32 = 3;
pub type wchar_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct max_align_t {
    pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
    pub __bindgen_padding_0: u64,
    pub __clang_max_align_nonce2: f64,
}
#[test]
fn bindgen_test_layout_max_align_t() {
    assert_eq!(
        ::std::mem::size_of::<max_align_t>(),
        32usize,
        concat!("Size of: ", stringify!(max_align_t))
    );
    assert_eq!(
        unsafe {
            &(*(::std::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 {
            &(*(::std::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)
        )
    );
}
pub type int_least8_t = ::std::os::raw::c_schar;
pub type int_least16_t = ::std::os::raw::c_short;
pub type int_least32_t = ::std::os::raw::c_int;
pub type int_least64_t = ::std::os::raw::c_long;
pub type uint_least8_t = ::std::os::raw::c_uchar;
pub type uint_least16_t = ::std::os::raw::c_ushort;
pub type uint_least32_t = ::std::os::raw::c_uint;
pub type uint_least64_t = ::std::os::raw::c_ulong;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_long;
pub type int_fast32_t = ::std::os::raw::c_long;
pub type int_fast64_t = ::std::os::raw::c_long;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_ulong;
pub type uint_fast32_t = ::std::os::raw::c_ulong;
pub type uint_fast64_t = ::std::os::raw::c_ulong;
pub type intmax_t = ::std::os::raw::c_long;
pub type uintmax_t = ::std::os::raw::c_ulong;
pub type va_list = __builtin_va_list;
pub type __gnuc_va_list = __builtin_va_list;
/// @brief the type used to the pipe ID
pub type runtime_api_pipe_id_t = u16;
/// @brief the type used to represent a pipe object, either a real pipe or a reference
/// to a module function
/// @note there are two different memory layout for this type <br/>
/// a) 11111111 00000000 pppppppp pppppppp <br/>
/// This is used when we refer a pipe id <br/>
/// b) mmmmmmmm oooooooo oooooooo oooooooo <br/>
/// This is used when we refer a service module function
pub type runtime_api_pipe_t = u32;
/// @brief the type used for the pipe define flags
/// @note the bit layout of a pipe flags is  <br/>
/// rrrrrrrr rrrDsapd tttttttt tttttttt <br/>
/// D = disabled <br/>
/// s = Shadow Pipe <br/>
/// a = Async Pipe <br/>
/// r = Reserved <br/>
/// p = Presist  <br/>
/// d = Pipe direction <br/>
/// t = Target Pipe <br/>
pub type runtime_api_pipe_flags_t = u32;
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_POS {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_POS() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_POS>(),
        0usize,
        concat!(
            "Size of: ",
            stringify!(__const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_POS)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_POS>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(__const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_POS)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_POS>())).test
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_POS),
            "::",
            stringify!(test)
        )
    );
}
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_NEG {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_NEG() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_NEG>(),
        0usize,
        concat!(
            "Size of: ",
            stringify!(__const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_NEG)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_NEG>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(__const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_NEG)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_NEG>())).test
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq_RUNTIME_API_PIPE_INPUT_CHECK_NEG),
            "::",
            stringify!(test)
        )
    );
}
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_POS {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_POS() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_POS>(),
        0usize,
        concat!(
            "Size of: ",
            stringify!(__const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_POS)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_POS>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(__const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_POS)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_POS>())).test
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_POS),
            "::",
            stringify!(test)
        )
    );
}
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_NEG {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_NEG() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_NEG>(),
        0usize,
        concat!(
            "Size of: ",
            stringify!(__const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_NEG)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_NEG>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(__const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_NEG)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_NEG>())).test
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq_RUNTIME_API_PIPE_OUTPUT_CHECK_NEG),
            "::",
            stringify!(test)
        )
    );
}
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq_flags_dir1 {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq_flags_dir1() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq_flags_dir1>(),
        0usize,
        concat!("Size of: ", stringify!(__const_checker_eq_flags_dir1))
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq_flags_dir1>(),
        4usize,
        concat!("Alignment of ", stringify!(__const_checker_eq_flags_dir1))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq_flags_dir1>())).test as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq_flags_dir1),
            "::",
            stringify!(test)
        )
    );
}
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq_flags_dir2 {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq_flags_dir2() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq_flags_dir2>(),
        0usize,
        concat!("Size of: ", stringify!(__const_checker_eq_flags_dir2))
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq_flags_dir2>(),
        4usize,
        concat!("Alignment of ", stringify!(__const_checker_eq_flags_dir2))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq_flags_dir2>())).test as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq_flags_dir2),
            "::",
            stringify!(test)
        )
    );
}
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq_flags_persist {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq_flags_persist() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq_flags_persist>(),
        0usize,
        concat!("Size of: ", stringify!(__const_checker_eq_flags_persist))
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq_flags_persist>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(__const_checker_eq_flags_persist)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq_flags_persist>())).test as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq_flags_persist),
            "::",
            stringify!(test)
        )
    );
}
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq___non_module_related_get_flags__ {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq___non_module_related_get_flags__() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq___non_module_related_get_flags__>(),
        0usize,
        concat!(
            "Size of: ",
            stringify!(__const_checker_eq___non_module_related_get_flags__)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq___non_module_related_get_flags__>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(__const_checker_eq___non_module_related_get_flags__)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq___non_module_related_get_flags__>())).test
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq___non_module_related_get_flags__),
            "::",
            stringify!(test)
        )
    );
}
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq___non_module_related_set_flag__ {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq___non_module_related_set_flag__() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq___non_module_related_set_flag__>(),
        0usize,
        concat!(
            "Size of: ",
            stringify!(__const_checker_eq___non_module_related_set_flag__)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq___non_module_related_set_flag__>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(__const_checker_eq___non_module_related_set_flag__)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq___non_module_related_set_flag__>())).test
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq___non_module_related_set_flag__),
            "::",
            stringify!(test)
        )
    );
}
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq___non_module_related_clr_flag__ {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq___non_module_related_clr_flag__() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq___non_module_related_clr_flag__>(),
        0usize,
        concat!(
            "Size of: ",
            stringify!(__const_checker_eq___non_module_related_clr_flag__)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq___non_module_related_clr_flag__>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(__const_checker_eq___non_module_related_clr_flag__)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq___non_module_related_clr_flag__>())).test
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq___non_module_related_clr_flag__),
            "::",
            stringify!(test)
        )
    );
}
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq___non_module_related_eom__ {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq___non_module_related_eom__() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq___non_module_related_eom__>(),
        0usize,
        concat!(
            "Size of: ",
            stringify!(__const_checker_eq___non_module_related_eom__)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq___non_module_related_eom__>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(__const_checker_eq___non_module_related_eom__)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq___non_module_related_eom__>())).test
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq___non_module_related_eom__),
            "::",
            stringify!(test)
        )
    );
}
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq___non_module_related_push_state__ {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq___non_module_related_push_state__() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq___non_module_related_push_state__>(),
        0usize,
        concat!(
            "Size of: ",
            stringify!(__const_checker_eq___non_module_related_push_state__)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq___non_module_related_push_state__>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(__const_checker_eq___non_module_related_push_state__)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq___non_module_related_push_state__>())).test
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq___non_module_related_push_state__),
            "::",
            stringify!(test)
        )
    );
}
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq___non_module_related_pop_state__ {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq___non_module_related_pop_state__() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq___non_module_related_pop_state__>(),
        0usize,
        concat!(
            "Size of: ",
            stringify!(__const_checker_eq___non_module_related_pop_state__)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq___non_module_related_pop_state__>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(__const_checker_eq___non_module_related_pop_state__)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq___non_module_related_pop_state__>())).test
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq___non_module_related_pop_state__),
            "::",
            stringify!(test)
        )
    );
}
/// @brief the token used to request local scope token
pub type runtime_api_scope_token_t = u32;
/// @brief The event description of the event driven scope stream. Which is actually a file descriptor and
/// when the file descriptor should be treated as the stream gets ready
/// If both read and write is 0, it means we want to remove the event from the module
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct runtime_api_scope_ready_event_t {
    /// < The FD that is used for event notification
    pub fd: ::std::os::raw::c_int,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
    /// < The time limit for the RLS token not gets ready
    pub timeout: i32,
}
#[test]
fn bindgen_test_layout_runtime_api_scope_ready_event_t() {
    assert_eq!(
        ::std::mem::size_of::<runtime_api_scope_ready_event_t>(),
        12usize,
        concat!("Size of: ", stringify!(runtime_api_scope_ready_event_t))
    );
    assert_eq!(
        ::std::mem::align_of::<runtime_api_scope_ready_event_t>(),
        4usize,
        concat!("Alignment of ", stringify!(runtime_api_scope_ready_event_t))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_scope_ready_event_t>())).fd as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_scope_ready_event_t),
            "::",
            stringify!(fd)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_scope_ready_event_t>())).timeout as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_scope_ready_event_t),
            "::",
            stringify!(timeout)
        )
    );
}
impl runtime_api_scope_ready_event_t {
    #[inline]
    pub fn read(&self) -> u32 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_read(&mut self, val: u32) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn write(&self) -> u32 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_write(&mut self, val: u32) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(read: u32, write: u32) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let read: u32 = unsafe { ::std::mem::transmute(read) };
            read as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let write: u32 = unsafe { ::std::mem::transmute(write) };
            write as u64
        });
        __bindgen_bitfield_unit
    }
}
/// @brief Represent an entity in the scope. It's actually a group of callback function for the opeartion
/// that is supported by the scope entity and a memory address which represent the entity data
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct runtime_api_scope_entity_t {
    /// < the actual pointer
    pub data: *mut ::std::os::raw::c_void,
    /// @brief the callback function used to copy the memory
    /// @param ptr the pointer to copy
    /// @return the copied pointer
    pub copy_func: ::std::option::Option<
        unsafe extern "C" fn(ptr: *const ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void,
    >,
    /// @brief the callback used to dispose a managed pointer
    /// @note this is the only required callback for each RLS object
    /// @param ptr the pointer to dispose
    /// @return status code
    pub free_func: ::std::option::Option<
        unsafe extern "C" fn(ptr: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
    >,
    /// @brief the callback function used to open the rscope pointer as a byte stream
    /// @note this is the callback function is used to serialize the RLS memory info a
    /// byte stream. This feature is used for the framework to write a serialized
    /// RLS directly to the pipe, which means we do not needs high level user-space
    /// program to handle this. <br/>
    /// The reason for why we have this is, without this mechanism,
    /// when we build a file server, we need to read the file content into a mem pipe,
    /// and then copy the mem pipe to async buffer and then write it to the socket.
    /// Most of the operations are unncessary. By introducing the file RLS, and this
    /// byte stream interface, we will be able to read the file from the async write loop
    /// directly. In this way, we can elimite the memory copy completely. <br/>
    /// @param ptr the RLS pointer to open
    /// @return the byte stream handle, which is the state variable for the serialization, NULL on error case
    pub open_func: ::std::option::Option<
        unsafe extern "C" fn(ptr: *const ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void,
    >,
    /// @brief read bytes from the byte stream representation of the RLS pointer
    /// @param handle the byte stream handle
    /// @param buffer the buffer to return the read result
    /// @param bufsize the buffer size
    /// @return the bytes has been read to buffer, or error code
    /// @note If this function returns 0, it may indicates the stream is waiting for resource gets ready
    /// In this case, if the user supports event driven interface, it may call event_func for the
    /// event description that hints the availibility of the stream.
    pub read_func: ::std::option::Option<
        unsafe extern "C" fn(
            handle: *mut ::std::os::raw::c_void,
            buffer: *mut ::std::os::raw::c_void,
            bufsize: usize,
        ) -> usize,
    >,
    /// @brief check if the byte stream representation of the RLS pointer has reached the end of stream (EOS)
    /// @param handle the byte stream handle
    /// @return the check result, 1 for true, 0 for false, error code on error cases
    pub eos_func: ::std::option::Option<
        unsafe extern "C" fn(handle: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int,
    >,
    /// @brief Get the event that should be used as the notification for the readiness of the stream
    /// @param handle The stream handle
    /// @param event_buf The buffer used to return the event
    /// @return Number of event has been registered, 0 if no event should be registered, 1 for needs to register one
    /// event and error code for all the error cases
    pub event_func: ::std::option::Option<
        unsafe extern "C" fn(
            handle: *mut ::std::os::raw::c_void,
            event_buf: *mut runtime_api_scope_ready_event_t,
        ) -> ::std::os::raw::c_int,
    >,
    /// @brief close a used stream handle
    /// @param handle the handle to close
    /// @note this function will dispose the memory occupied by the handle
    /// @return status code
    pub close_func: ::std::option::Option<
        unsafe extern "C" fn(handle: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
    >,
}
#[test]
fn bindgen_test_layout_runtime_api_scope_entity_t() {
    assert_eq!(
        ::std::mem::size_of::<runtime_api_scope_entity_t>(),
        64usize,
        concat!("Size of: ", stringify!(runtime_api_scope_entity_t))
    );
    assert_eq!(
        ::std::mem::align_of::<runtime_api_scope_entity_t>(),
        8usize,
        concat!("Alignment of ", stringify!(runtime_api_scope_entity_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<runtime_api_scope_entity_t>())).data as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_scope_entity_t),
            "::",
            stringify!(data)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_scope_entity_t>())).copy_func as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_scope_entity_t),
            "::",
            stringify!(copy_func)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_scope_entity_t>())).free_func as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_scope_entity_t),
            "::",
            stringify!(free_func)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_scope_entity_t>())).open_func as *const _ as usize
        },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_scope_entity_t),
            "::",
            stringify!(open_func)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_scope_entity_t>())).read_func as *const _ as usize
        },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_scope_entity_t),
            "::",
            stringify!(read_func)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_scope_entity_t>())).eos_func as *const _ as usize
        },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_scope_entity_t),
            "::",
            stringify!(eos_func)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_scope_entity_t>())).event_func as *const _ as usize
        },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_scope_entity_t),
            "::",
            stringify!(event_func)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_scope_entity_t>())).close_func as *const _ as usize
        },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_scope_entity_t),
            "::",
            stringify!(close_func)
        )
    );
}
/// @brief describe the param for the request that ask for the write_token API consume the
/// token data in the way specified by this
/// @details Problem: This mechanism is used to address the problem that the directly RLS token access interface
/// is not buffer friendly. Consider we use an BIO object to write the pipe, so all the data that has written
/// to pipe via BIO is bufferred in the BIO buffer. After this, if we want to write a RLS token, the BIO buffer
/// has to flush no matter if it's full or not. <br/>
/// Because the write_token call do not aware of the BIO buffer, so it will write the data directly, however all
/// the bufferred BIO data which should be written before the token is now after the token content. <br/>
/// However, this additional flush causes serious problem. Because we have to flush the buffer once the write_token has
/// been called. For example, previously, we will be able to use the bio call like:
/// <code>
/// pstd_bio_printf("<div>%s</div>", file_content);
/// </code>
/// To write the response which will translate to 1 pipe_write of course, however, by introducing the DRA, we should use:
/// <code>
/// pstd_bio_printf("<div>");
/// pstd_bio_write_token(file_token);
/// pstd_bio_printf("</div>");
/// </code>
/// Which actually needs to translate to 3 pipe_write, which turns out to be 3 syscalls. <br/>
/// This causes a huge performance downgrade from 115K Req/sec to 68K req/sec for the user-agent echo back server.
/// Solution: This is the descriptor that request the first N bytes from the RLS token stream, and this data will be passed in
/// to the callback provided by the caller of write_token, by having this callback, the caller (which is PSTD BIO of course),
/// will have a last chance to fill the unused buffer. If the stream is exhuasted by the data request, no underlying DRA will
/// happen, otherwise, the DRA will handle the remaining portion of the stream. <br/>
/// If the data is exhuasted by the data request and BIO buffer is not full, then the buffer won't flush. In this way, we make
/// a full use of user-space buffer before we flush it.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct runtime_api_scope_token_data_request_t {
    /// < The number of bytes we are reqeusting
    pub size: usize,
    /// < The caller context of this data request
    pub context: *mut ::std::os::raw::c_void,
    /// @brief the callback function that handles the requested data, it may be called multiple times
    /// once the data_handler returns 0, then it means the data request do not want the data anymore
    /// @param context the caller defined context
    /// @param data the pointer to the data section
    /// @param count the number of bytes is available at this time
    /// @return the number of bytes handled by this call, if the return value is larger than 0 and the requested size
    /// limit not reach, then the remaning data from the token stream will keep sent to the handler, until
    /// it returns an error code or 0
    pub data_handler: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ::std::os::raw::c_void,
            data: *const ::std::os::raw::c_void,
            count: usize,
        ) -> usize,
    >,
}
#[test]
fn bindgen_test_layout_runtime_api_scope_token_data_request_t() {
    assert_eq!(
        ::std::mem::size_of::<runtime_api_scope_token_data_request_t>(),
        24usize,
        concat!(
            "Size of: ",
            stringify!(runtime_api_scope_token_data_request_t)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<runtime_api_scope_token_data_request_t>(),
        8usize,
        concat!(
            "Alignment of ",
            stringify!(runtime_api_scope_token_data_request_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_scope_token_data_request_t>())).size as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_scope_token_data_request_t),
            "::",
            stringify!(size)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_scope_token_data_request_t>())).context as *const _
                as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_scope_token_data_request_t),
            "::",
            stringify!(context)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_scope_token_data_request_t>())).data_handler
                as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_scope_token_data_request_t),
            "::",
            stringify!(data_handler)
        )
    );
}
/// @brief The callback when the type of the pipe is determined
/// @param pipe the pipe descriptor
/// @param type_name the concrete type name of the pipe
/// @param data the addtional data passed to the callback, typically the servlet instance context
/// @return status code
pub type runtime_api_pipe_type_callback_t = ::std::option::Option<
    unsafe extern "C" fn(
        pipe: runtime_api_pipe_t,
        type_name: *const ::std::os::raw::c_char,
        data: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int,
>;
/// < This is a sync servlet
pub const RUNTIME_API_INIT_RESULT_SYNC: _bindgen_ty_1 = 0;
/// < This is an async servlet
pub const RUNTIME_API_INIT_RESULT_ASYNC: _bindgen_ty_1 = 1;
/// @brief The return value for the servlet's init function, which indicates the property of the servlet
pub type _bindgen_ty_1 = u32;
#[repr(C)]
#[derive(Debug)]
pub struct __const_checker_eq_RUNTIME_API_INIT_RESULT_SYNC {
    pub test: __IncompleteArrayField<::std::os::raw::c_int>,
}
#[test]
fn bindgen_test_layout___const_checker_eq_RUNTIME_API_INIT_RESULT_SYNC() {
    assert_eq!(
        ::std::mem::size_of::<__const_checker_eq_RUNTIME_API_INIT_RESULT_SYNC>(),
        0usize,
        concat!(
            "Size of: ",
            stringify!(__const_checker_eq_RUNTIME_API_INIT_RESULT_SYNC)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<__const_checker_eq_RUNTIME_API_INIT_RESULT_SYNC>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(__const_checker_eq_RUNTIME_API_INIT_RESULT_SYNC)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__const_checker_eq_RUNTIME_API_INIT_RESULT_SYNC>())).test
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__const_checker_eq_RUNTIME_API_INIT_RESULT_SYNC),
            "::",
            stringify!(test)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _runtime_api_async_task_handle_t {
    _unused: [u8; 0],
}
/// @brief This is the dummy type we used to make the compiler aware we are dealing with a async task handle
pub type runtime_api_async_handle_t = _runtime_api_async_task_handle_t;
/// @brief the address table that contains the address of the pipe APIs
/// @note we do not need the servlet instance id, because the caller of the exec of the init will definately have the execution info. <br/>
/// All the function defined in this place can only be called within the servlet context. <br/>
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct runtime_api_address_table_t {
    /// @brief define a named pipe in the PDT of this servlet
    /// @details Define a IO pipe for a servlet. The function will define a pipe for a servlet.
    /// Which is actually either the input or the output end of a pipe. <br/>
    /// The function will return a integer called pipe descriptor. The pipe descriptor can be
    /// used later in the exec function of the servlet as the data source/sink. <br/>
    /// For the given servlet instance, once the instance is initialized, the servlet can not
    /// define the pipe anymore. <br/>
    /// The reason for why we need such limitation is the topologic structure of a service *must*
    /// be defined before the framework start serving traffic. Which means, we do not allow the
    /// node change it's layout after the initialization pharse. <br/>
    /// Also, the pipe can be defined with different properties. The properties can be changed at
    /// the execution pharse for *only that exuection*. Which means you can not preserve the pipe
    /// flags changed in execution phrase.
    /// @note This function must be called by the **init** function in servlet
    /// @param name the name to this pipe
    /// @param flag the flag to create this pipe
    /// @param type_expr the type expression for this pipe, if NULL is given, then this is a untyped pipe
    /// @return pipe id or a negative error code
    pub define: ::std::option::Option<
        unsafe extern "C" fn(
            name: *const ::std::os::raw::c_char,
            flag: runtime_api_pipe_flags_t,
            type_expr: *const ::std::os::raw::c_char,
        ) -> runtime_api_pipe_t,
    >,
    /// @brief setup the hook function when the type of pipe is determined. The reason for having this function is
    /// that we have some generic typed servlet. So the type of the pipe is depends on the context of the service
    /// graph, rather than the servlet itself. So that we do not know the concrete type of the generic pipe until
    /// we finished the type inference. <br/>
    /// However, we don't want to query the type info in exeuction time, because of the perofmrance consideration.
    /// So we should have some mechanism so that we can initialize the type specified information before the servlet
    /// actually started.
    /// @param callback the callback function pointer
    /// @param pipe     the pipe descriptor we want to set the callback
    /// @param data     the additional data to be passed to the callback function
    /// @note  Because the type inferrer only work on the assigned pipes, so even though the type of unassigned pipes are known
    /// the callback function won't be called.
    /// @return status code
    /// @todo implement this
    pub set_type_hook: ::std::option::Option<
        unsafe extern "C" fn(
            pipe: runtime_api_pipe_t,
            callback: runtime_api_pipe_type_callback_t,
            data: *mut ::std::os::raw::c_void,
        ) -> ::std::os::raw::c_int,
    >,
    /// @brief read data from pipe
    /// @param pipe the pipe to read
    /// @param nbytes the number of bytes to read
    /// @param buffer the memory buffer for the read result
    /// @return either the number of bytes or the error code
    pub read: ::std::option::Option<
        unsafe extern "C" fn(
            pipe: runtime_api_pipe_t,
            buffer: *mut ::std::os::raw::c_void,
            nbytes: usize,
        ) -> usize,
    >,
    /// @brief write data to the given pipe
    /// @param pipe the pipe to write
    /// @param data the data buffer
    /// @param nbytes the number of bytes to write
    /// @return number of bytes has written
    pub write: ::std::option::Option<
        unsafe extern "C" fn(
            pipe: runtime_api_pipe_t,
            data: *const ::std::os::raw::c_void,
            nbytes: usize,
        ) -> usize,
    >,
    /// @brief write the content of a scope token to the pipe
    /// @details The detailed description can be found in the documentation of the module call write_callback
    /// @param pipe the pipe to write
    /// @param token the token
    /// @param data_req the data request callback, see the type documentation for the details about the data request mechanism.
    /// If the data request is not desired, pass just NULL. During this time, no pointer's ownership will be taken
    /// @note this function will make sure that all the bytes for this token is written to the pipe
    /// @return status code
    pub write_scope_token: ::std::option::Option<
        unsafe extern "C" fn(
            pipe: runtime_api_pipe_t,
            token: runtime_api_scope_token_t,
            data_req: *const runtime_api_scope_token_data_request_t,
        ) -> ::std::os::raw::c_int,
    >,
    /// @brief write a log to the plumber logging system
    /// @param level the log level
    /// @param file  the source code file name
    /// @param function the function name
    /// @param line the line number
    /// @param fmt the formatting string
    /// @param ap the vaargs
    /// @return nothing
    pub log_write: ::std::option::Option<
        unsafe extern "C" fn(
            level: ::std::os::raw::c_int,
            file: *const ::std::os::raw::c_char,
            function: *const ::std::os::raw::c_char,
            line: ::std::os::raw::c_int,
            fmt: *const ::std::os::raw::c_char,
            ap: *mut __va_list_tag,
        ),
    >,
    /// @brief trap is a function that makes the execution flow goes back to the Plumber framework
    /// @param id the trap id
    pub trap: ::std::option::Option<unsafe extern "C" fn(id: ::std::os::raw::c_int)>,
    /// @brief EOF check
    /// @param pipe the pipe id
    /// @return result or status code
    pub eof: ::std::option::Option<
        unsafe extern "C" fn(pipe: runtime_api_pipe_t) -> ::std::os::raw::c_int,
    >,
    /// @brief the pipe control API
    /// @note this function is used to control pipe behaviour, like POSIX API fcntl. This function
    /// modifies the current pipe instance only, and do not affect any other pipe instnaces.
    /// @param pipe the target pipe
    /// @param opcode what operation needs to be perfomed
    /// @param ap the va params
    /// @return the status code
    pub cntl: ::std::option::Option<
        unsafe extern "C" fn(pipe: runtime_api_pipe_t, opcode: u32, ap: *mut __va_list_tag)
            -> ::std::os::raw::c_int,
    >,
    /// @brief requires a module function handle pipe so that the servlet can call the service module
    /// @param mod_name the name of the service module function, e.g. "mempool.object_pool"
    /// @param func_name the name of the function we want, e.g. "allocate"
    /// @return the module type code
    pub get_module_func: ::std::option::Option<
        unsafe extern "C" fn(
            mod_name: *const ::std::os::raw::c_char,
            func_name: *const ::std::os::raw::c_char,
        ) -> runtime_api_pipe_t,
    >,
    /// @brief open a module by its name
    /// @param mod the name of the module
    /// @note this function must match the exact module path
    /// @return the module type code or error code
    pub mod_open:
        ::std::option::Option<unsafe extern "C" fn(mod_: *const ::std::os::raw::c_char) -> u8>,
    /// @brief get the 8bit prefix used for the module specified cntl opcode
    /// @param path the path to the module suffix, for example all the TLS module should use "pipe.tls"
    /// @param result the result prefix, if there's no module instace under the given path, the result will be set to ERROR_CODE(uint8_t)
    /// @note The reason why we need this function is: <br/>
    /// 1. The module is dynmaically loaded, so the module id is determined in runtime <br/>
    /// 2. The servlet API is module-implementation-transparent, which means we cannot put any pipe implementation specified code in the
    /// servlet code <br/>
    /// In some cases, we may have serveral module instatiated from the same module binary
    /// with different module initializtion param.
    /// In this case, if we need to call the module specified control opcode, we *have to* know
    /// the module id, because the opcode for module specified opcode is &lt;module-id, module-specfied-opcode&gt; <br/>
    /// The module id can be get from mod_open call, however, it requires a full path to the module instance. This
    /// makes the details of the pipe not transparent to the servlet. <br/>
    /// For example, in code we may want to disable the TLS encrpytion because of the oppurtunistic encryption.
    /// On the server which is configured the TLS module is listening to the port 443. With mod_open call, we have to
    /// make the code like:
    /// \code{.c}
    /// uint8_t mod = mod_open("pipe.tls.pipe.tcp.port_443");
    /// uint32_t opcode = (mod << 24) | (OPCODE_WE_WANT);
    /// pipe_cntl(pipe, opcode, ....);
    /// \endcode
    /// As we can see from the code, once the port gets changed, the servlet doesn't work anymore.
    /// So it's not pipe transparent. <br/>
    /// To address this issue, we actually use *one representitive of all the module instances that is initialized from the same module binary*.
    /// Because all the module binary are the same, so the ITC framework will be able to call the correct module binary.
    /// At the same time, because the pipe itself has a reference to the module instance context, so the call will be forwarded correctly. <br/>
    /// On the other hand, it's reasonable for all the module instance from same binary (e.g. all the TLS modules) to have the same opcode
    /// because it's reasonable to have all those module instances gets the same opcode. <br/>
    /// Based on the reason above we need the function that can return a "representitive module instance" for all the module which creates from the
    /// same module binary. <br/>
    /// In this function, we need assume that all the module instances under the given path are created from the same module binary.
    /// If this rule breaks, it will return an error code
    /// @return status code
    pub mod_cntl_prefix: ::std::option::Option<
        unsafe extern "C" fn(path: *const ::std::os::raw::c_char, result: *mut u8)
            -> ::std::os::raw::c_int,
    >,
    /// @brief get the plumber version number
    /// @return the plumber version number string, NULL on error
    pub version: ::std::option::Option<unsafe extern "C" fn() -> *const ::std::os::raw::c_char>,
    /// @brief The async task control function
    /// @note This function is the only plumber API can be called from the async processing thread.
    /// And we actually have the limit for this function is we should call this function with task context,
    /// otherwise we should provide the task_handle (The example for this case is the ASYNC_CNTL_OPCODE_NOTIFY_WAIT,
    /// which we may not call the function from the thread working on the async task. In this case, we just extract
    /// the async context from the handle
    /// @todo implement this
    /// @return status code
    pub async_cntl: ::std::option::Option<
        unsafe extern "C" fn(
            async_handle: *mut runtime_api_async_handle_t,
            opcode: u32,
            ap: *mut __va_list_tag,
        ) -> ::std::os::raw::c_int,
    >,
}
#[test]
fn bindgen_test_layout_runtime_api_address_table_t() {
    assert_eq!(
        ::std::mem::size_of::<runtime_api_address_table_t>(),
        112usize,
        concat!("Size of: ", stringify!(runtime_api_address_table_t))
    );
    assert_eq!(
        ::std::mem::align_of::<runtime_api_address_table_t>(),
        8usize,
        concat!("Alignment of ", stringify!(runtime_api_address_table_t))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_address_table_t>())).define as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(define)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_address_table_t>())).set_type_hook as *const _
                as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(set_type_hook)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_address_table_t>())).read as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(read)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_address_table_t>())).write as *const _ as usize
        },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(write)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_address_table_t>())).write_scope_token as *const _
                as usize
        },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(write_scope_token)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_address_table_t>())).log_write as *const _ as usize
        },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(log_write)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_address_table_t>())).trap as *const _ as usize
        },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(trap)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<runtime_api_address_table_t>())).eof as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(eof)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_address_table_t>())).cntl as *const _ as usize
        },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(cntl)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_address_table_t>())).get_module_func as *const _
                as usize
        },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(get_module_func)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_address_table_t>())).mod_open as *const _ as usize
        },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(mod_open)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_address_table_t>())).mod_cntl_prefix as *const _
                as usize
        },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(mod_cntl_prefix)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_address_table_t>())).version as *const _ as usize
        },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(version)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_address_table_t>())).async_cntl as *const _ as usize
        },
        104usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_address_table_t),
            "::",
            stringify!(async_cntl)
        )
    );
}
/// @brief the data structure used to define a servlet
/// @note  Instead of checking if the callback fuction is defined to determine if this is an async task. We relies on the
/// return value of the init function. This is because for the language support servlet, we can not tell if it's a
/// async servlet or not during the compile time. The only way for us to kown this is get the servlet fully initialized<br/>
/// If the init function returns RUNTIME_API_INIT_RESULT_SYNC and exec function has been defined, all the async_* function
/// won't be used any mopre. This case indicates we have a sync servlet. <br/>
/// If the init function returns RUNTIME_API_INIT_RESULT_ASYNC, asyc_init must be defined
/// This case indicates we have an async servlet <br/>
/// The async_exec and async_cleanup function is not necessarily to be defined. Because for some case, we
/// actually can have a task initialize a async IO form the async_init and set the async task mode to the wait mode
/// Then we can have an undefined async_exec function, which means we don't need to do anything other than initializing
/// the IO. <br/>
/// If the exec function is not defined and init returns RUNTIME_API_INIT_RESULT_SYNC, this indicates we have an sync servlet
/// with an empty exec function. This is useful when we only have a shadow output for the servlet, for example, dataflow/dup.
/// @todo  When a servlet is loaded we should
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct runtime_api_servlet_def_t {
    /// < the size of the additional data for this servlet
    pub size: usize,
    /// < the description of this servlet
    pub desc: *const ::std::os::raw::c_char,
    /// < the required API version for this servlet, currently is 0
    pub version: u32,
    /// @brief The function that will be called by the initialize task
    /// @param argc the argument count
    /// @param argv the value list of arguments
    /// @param data the servlet local data that needs to be intialized
    /// @return The servlet property flags, or error code
    pub init: ::std::option::Option<
        unsafe extern "C" fn(
            argc: u32,
            argv: *const *const ::std::os::raw::c_char,
            data: *mut ::std::os::raw::c_void,
        ) -> ::std::os::raw::c_int,
    >,
    /// @brief the function that will be called by the execution task
    /// @param data the servlet local data
    /// @return status code
    pub exec: ::std::option::Option<
        unsafe extern "C" fn(data: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
    >,
    /// @brief the function that will be called by the finalization task
    /// @param data the local data that need to be handled by the servlet
    /// @return status code
    pub unload: ::std::option::Option<
        unsafe extern "C" fn(data: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
    >,
    /// < The async buffer size
    pub async_buf_size: u32,
    /// @brief The initialization stage of the async task
    /// @param task This is the handle we used to pass to the async_cntl funciton
    /// @param data The servlet local context
    /// @param async_buf The buffer we are going to carry to the async_exec
    /// @note For the async_exec function, we don't allow the servlet access any servlet context,
    /// because this breaks the thread convention of the worker thread.
    /// This make the async task has to copy all the required data to the async buf, which is
    /// complete different memory, and this memory will be the only data the async_exec function
    /// can access
    /// @return status code
    pub async_setup: ::std::option::Option<
        unsafe extern "C" fn(
            task: *mut runtime_api_async_handle_t,
            async_buf: *mut ::std::os::raw::c_void,
            data: *mut ::std::os::raw::c_void,
        ) -> ::std::os::raw::c_int,
    >,
    /// @brief Execute the initialized async task, the only input of the async buf is the async buf
    /// In this function, all the API calls are disallowed.
    /// @param async_buf The async data buffer
    /// @param task This is the handle we used to pass to the async_cntl funciton
    /// @return status code
    pub async_exec: ::std::option::Option<
        unsafe extern "C" fn(
            task: *mut runtime_api_async_handle_t,
            async_data: *mut ::std::os::raw::c_void,
        ) -> ::std::os::raw::c_int,
    >,
    /// @brief Clean the used async data
    /// @param data The servlet local context data
    /// @param task_handle This is the handle we used to pass to the async_cntl funciton
    /// @return status code
    pub async_cleanup: ::std::option::Option<
        unsafe extern "C" fn(
            task: *mut runtime_api_async_handle_t,
            async_data: *mut ::std::os::raw::c_void,
            data: *mut ::std::os::raw::c_void,
        ) -> ::std::os::raw::c_int,
    >,
}
#[test]
fn bindgen_test_layout_runtime_api_servlet_def_t() {
    assert_eq!(
        ::std::mem::size_of::<runtime_api_servlet_def_t>(),
        80usize,
        concat!("Size of: ", stringify!(runtime_api_servlet_def_t))
    );
    assert_eq!(
        ::std::mem::align_of::<runtime_api_servlet_def_t>(),
        8usize,
        concat!("Alignment of ", stringify!(runtime_api_servlet_def_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<runtime_api_servlet_def_t>())).size as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_servlet_def_t),
            "::",
            stringify!(size)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<runtime_api_servlet_def_t>())).desc as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_servlet_def_t),
            "::",
            stringify!(desc)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_servlet_def_t>())).version as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_servlet_def_t),
            "::",
            stringify!(version)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<runtime_api_servlet_def_t>())).init as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_servlet_def_t),
            "::",
            stringify!(init)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<runtime_api_servlet_def_t>())).exec as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_servlet_def_t),
            "::",
            stringify!(exec)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_servlet_def_t>())).unload as *const _ as usize
        },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_servlet_def_t),
            "::",
            stringify!(unload)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_servlet_def_t>())).async_buf_size as *const _
                as usize
        },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_servlet_def_t),
            "::",
            stringify!(async_buf_size)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_servlet_def_t>())).async_setup as *const _ as usize
        },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_servlet_def_t),
            "::",
            stringify!(async_setup)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_servlet_def_t>())).async_exec as *const _ as usize
        },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_servlet_def_t),
            "::",
            stringify!(async_exec)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<runtime_api_servlet_def_t>())).async_cleanup as *const _ as usize
        },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(runtime_api_servlet_def_t),
            "::",
            stringify!(async_cleanup)
        )
    );
}
pub type __builtin_va_list = [__va_list_tag; 1usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __va_list_tag {
    pub gp_offset: ::std::os::raw::c_uint,
    pub fp_offset: ::std::os::raw::c_uint,
    pub overflow_arg_area: *mut ::std::os::raw::c_void,
    pub reg_save_area: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout___va_list_tag() {
    assert_eq!(
        ::std::mem::size_of::<__va_list_tag>(),
        24usize,
        concat!("Size of: ", stringify!(__va_list_tag))
    );
    assert_eq!(
        ::std::mem::align_of::<__va_list_tag>(),
        8usize,
        concat!("Alignment of ", stringify!(__va_list_tag))
    );
    assert_eq!(
        unsafe { &(*(::std::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 { &(*(::std::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 { &(*(::std::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 { &(*(::std::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)
        )
    );
}