rust_icu_sys 5.6.0

Native bindings to the ICU4C library from Unicode.
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
/* automatically generated by rust-bindgen 0.72.1 */

#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
    storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
    #[inline]
    pub const fn new(storage: Storage) -> Self {
        Self { storage }
    }
}
impl<Storage> __BindgenBitfieldUnit<Storage>
where
    Storage: AsRef<[u8]> + AsMut<[u8]>,
{
    #[inline]
    fn extract_bit(byte: u8, index: usize) -> bool {
        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 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];
        Self::extract_bit(byte, index)
    }
    #[inline]
    pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
        debug_assert!(index / 8 < core::mem::size_of::<Storage>());
        let byte_index = index / 8;
        let byte = unsafe {
            *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize)
        };
        Self::extract_bit(byte, index)
    }
    #[inline]
    fn change_bit(byte: u8, index: usize, val: bool) -> u8 {
        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 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];
        *byte = Self::change_bit(*byte, index, val);
    }
    #[inline]
    pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
        debug_assert!(index / 8 < core::mem::size_of::<Storage>());
        let byte_index = index / 8;
        let byte = unsafe {
            (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize)
        };
        unsafe { *byte = Self::change_bit(*byte, index, val) };
    }
    #[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 unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
        let mut val = 0;
        for i in 0..(bit_width as usize) {
            if unsafe { Self::raw_get_bit(this, 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);
        }
    }
    #[inline]
    pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
        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
            };
            unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
        }
    }
}
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __uint_least16_t = __uint16_t;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
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 = ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq)]
pub struct _IO_FILE {
    pub _flags: ::std::os::raw::c_int,
    pub _IO_read_ptr: *mut ::std::os::raw::c_char,
    pub _IO_read_end: *mut ::std::os::raw::c_char,
    pub _IO_read_base: *mut ::std::os::raw::c_char,
    pub _IO_write_base: *mut ::std::os::raw::c_char,
    pub _IO_write_ptr: *mut ::std::os::raw::c_char,
    pub _IO_write_end: *mut ::std::os::raw::c_char,
    pub _IO_buf_base: *mut ::std::os::raw::c_char,
    pub _IO_buf_end: *mut ::std::os::raw::c_char,
    pub _IO_save_base: *mut ::std::os::raw::c_char,
    pub _IO_backup_base: *mut ::std::os::raw::c_char,
    pub _IO_save_end: *mut ::std::os::raw::c_char,
    pub _markers: *mut _IO_marker,
    pub _chain: *mut _IO_FILE,
    pub _fileno: ::std::os::raw::c_int,
    pub _bitfield_align_1: [u32; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
    pub _short_backupbuf: [::std::os::raw::c_char; 1usize],
    pub _old_offset: __off_t,
    pub _cur_column: ::std::os::raw::c_ushort,
    pub _vtable_offset: ::std::os::raw::c_schar,
    pub _shortbuf: [::std::os::raw::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 ::std::os::raw::c_void,
    pub _prevchain: *mut *mut _IO_FILE,
    pub _mode: ::std::os::raw::c_int,
    pub _unused2: [::std::os::raw::c_char; 20usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of _IO_FILE"][::std::mem::size_of::<_IO_FILE>() - 216usize];
    ["Alignment of _IO_FILE"][::std::mem::align_of::<_IO_FILE>() - 8usize];
    ["Offset of field: _IO_FILE::_flags"][::std::mem::offset_of!(_IO_FILE, _flags) - 0usize];
    ["Offset of field: _IO_FILE::_IO_read_ptr"]
        [::std::mem::offset_of!(_IO_FILE, _IO_read_ptr) - 8usize];
    ["Offset of field: _IO_FILE::_IO_read_end"]
        [::std::mem::offset_of!(_IO_FILE, _IO_read_end) - 16usize];
    ["Offset of field: _IO_FILE::_IO_read_base"]
        [::std::mem::offset_of!(_IO_FILE, _IO_read_base) - 24usize];
    ["Offset of field: _IO_FILE::_IO_write_base"]
        [::std::mem::offset_of!(_IO_FILE, _IO_write_base) - 32usize];
    ["Offset of field: _IO_FILE::_IO_write_ptr"]
        [::std::mem::offset_of!(_IO_FILE, _IO_write_ptr) - 40usize];
    ["Offset of field: _IO_FILE::_IO_write_end"]
        [::std::mem::offset_of!(_IO_FILE, _IO_write_end) - 48usize];
    ["Offset of field: _IO_FILE::_IO_buf_base"]
        [::std::mem::offset_of!(_IO_FILE, _IO_buf_base) - 56usize];
    ["Offset of field: _IO_FILE::_IO_buf_end"]
        [::std::mem::offset_of!(_IO_FILE, _IO_buf_end) - 64usize];
    ["Offset of field: _IO_FILE::_IO_save_base"]
        [::std::mem::offset_of!(_IO_FILE, _IO_save_base) - 72usize];
    ["Offset of field: _IO_FILE::_IO_backup_base"]
        [::std::mem::offset_of!(_IO_FILE, _IO_backup_base) - 80usize];
    ["Offset of field: _IO_FILE::_IO_save_end"]
        [::std::mem::offset_of!(_IO_FILE, _IO_save_end) - 88usize];
    ["Offset of field: _IO_FILE::_markers"][::std::mem::offset_of!(_IO_FILE, _markers) - 96usize];
    ["Offset of field: _IO_FILE::_chain"][::std::mem::offset_of!(_IO_FILE, _chain) - 104usize];
    ["Offset of field: _IO_FILE::_fileno"][::std::mem::offset_of!(_IO_FILE, _fileno) - 112usize];
    ["Offset of field: _IO_FILE::_short_backupbuf"]
        [::std::mem::offset_of!(_IO_FILE, _short_backupbuf) - 119usize];
    ["Offset of field: _IO_FILE::_old_offset"]
        [::std::mem::offset_of!(_IO_FILE, _old_offset) - 120usize];
    ["Offset of field: _IO_FILE::_cur_column"]
        [::std::mem::offset_of!(_IO_FILE, _cur_column) - 128usize];
    ["Offset of field: _IO_FILE::_vtable_offset"]
        [::std::mem::offset_of!(_IO_FILE, _vtable_offset) - 130usize];
    ["Offset of field: _IO_FILE::_shortbuf"]
        [::std::mem::offset_of!(_IO_FILE, _shortbuf) - 131usize];
    ["Offset of field: _IO_FILE::_lock"][::std::mem::offset_of!(_IO_FILE, _lock) - 136usize];
    ["Offset of field: _IO_FILE::_offset"][::std::mem::offset_of!(_IO_FILE, _offset) - 144usize];
    ["Offset of field: _IO_FILE::_codecvt"][::std::mem::offset_of!(_IO_FILE, _codecvt) - 152usize];
    ["Offset of field: _IO_FILE::_wide_data"]
        [::std::mem::offset_of!(_IO_FILE, _wide_data) - 160usize];
    ["Offset of field: _IO_FILE::_freeres_list"]
        [::std::mem::offset_of!(_IO_FILE, _freeres_list) - 168usize];
    ["Offset of field: _IO_FILE::_freeres_buf"]
        [::std::mem::offset_of!(_IO_FILE, _freeres_buf) - 176usize];
    ["Offset of field: _IO_FILE::_prevchain"]
        [::std::mem::offset_of!(_IO_FILE, _prevchain) - 184usize];
    ["Offset of field: _IO_FILE::_mode"][::std::mem::offset_of!(_IO_FILE, _mode) - 192usize];
    ["Offset of field: _IO_FILE::_unused2"][::std::mem::offset_of!(_IO_FILE, _unused2) - 196usize];
};
impl Default for _IO_FILE {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl _IO_FILE {
    #[inline]
    pub fn _flags2(&self) -> ::std::os::raw::c_int {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) }
    }
    #[inline]
    pub fn set__flags2(&mut self, val: ::std::os::raw::c_int) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 24u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn _flags2_raw(this: *const Self) -> ::std::os::raw::c_int {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                0usize,
                24u8,
            ) as u32)
        }
    }
    #[inline]
    pub unsafe fn set__flags2_raw(this: *mut Self, val: ::std::os::raw::c_int) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                0usize,
                24u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn new_bitfield_1(_flags2: ::std::os::raw::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
        __bindgen_bitfield_unit.set(0usize, 24u8, {
            let _flags2: u32 = unsafe { ::std::mem::transmute(_flags2) };
            _flags2 as u64
        });
        __bindgen_bitfield_unit
    }
}
pub type char16_t = __uint_least16_t;
pub type UBool = i8;
pub type UChar = char16_t;
pub type UChar32 = i32;
#[repr(C)]
#[derive(Copy, Clone)]
pub union UCPTrieData {
    pub ptr0: *const ::std::os::raw::c_void,
    pub ptr16: *const u16,
    pub ptr32: *const u32,
    pub ptr8: *const u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of UCPTrieData"][::std::mem::size_of::<UCPTrieData>() - 8usize];
    ["Alignment of UCPTrieData"][::std::mem::align_of::<UCPTrieData>() - 8usize];
    ["Offset of field: UCPTrieData::ptr0"][::std::mem::offset_of!(UCPTrieData, ptr0) - 0usize];
    ["Offset of field: UCPTrieData::ptr16"][::std::mem::offset_of!(UCPTrieData, ptr16) - 0usize];
    ["Offset of field: UCPTrieData::ptr32"][::std::mem::offset_of!(UCPTrieData, ptr32) - 0usize];
    ["Offset of field: UCPTrieData::ptr8"][::std::mem::offset_of!(UCPTrieData, ptr8) - 0usize];
};
impl Default for UCPTrieData {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UCPTrie {
    pub index: *const u16,
    pub data: UCPTrieData,
    pub indexLength: i32,
    pub dataLength: i32,
    pub highStart: UChar32,
    pub shifted12HighStart: u16,
    pub type_: i8,
    pub valueWidth: i8,
    pub reserved32: u32,
    pub reserved16: u16,
    pub index3NullOffset: u16,
    pub dataNullOffset: i32,
    pub nullValue: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of UCPTrie"][::std::mem::size_of::<UCPTrie>() - 48usize];
    ["Alignment of UCPTrie"][::std::mem::align_of::<UCPTrie>() - 8usize];
    ["Offset of field: UCPTrie::index"][::std::mem::offset_of!(UCPTrie, index) - 0usize];
    ["Offset of field: UCPTrie::data"][::std::mem::offset_of!(UCPTrie, data) - 8usize];
    ["Offset of field: UCPTrie::indexLength"]
        [::std::mem::offset_of!(UCPTrie, indexLength) - 16usize];
    ["Offset of field: UCPTrie::dataLength"][::std::mem::offset_of!(UCPTrie, dataLength) - 20usize];
    ["Offset of field: UCPTrie::highStart"][::std::mem::offset_of!(UCPTrie, highStart) - 24usize];
    ["Offset of field: UCPTrie::shifted12HighStart"]
        [::std::mem::offset_of!(UCPTrie, shifted12HighStart) - 28usize];
    ["Offset of field: UCPTrie::type_"][::std::mem::offset_of!(UCPTrie, type_) - 30usize];
    ["Offset of field: UCPTrie::valueWidth"][::std::mem::offset_of!(UCPTrie, valueWidth) - 31usize];
    ["Offset of field: UCPTrie::reserved32"][::std::mem::offset_of!(UCPTrie, reserved32) - 32usize];
    ["Offset of field: UCPTrie::reserved16"][::std::mem::offset_of!(UCPTrie, reserved16) - 36usize];
    ["Offset of field: UCPTrie::index3NullOffset"]
        [::std::mem::offset_of!(UCPTrie, index3NullOffset) - 38usize];
    ["Offset of field: UCPTrie::dataNullOffset"]
        [::std::mem::offset_of!(UCPTrie, dataNullOffset) - 40usize];
    ["Offset of field: UCPTrie::nullValue"][::std::mem::offset_of!(UCPTrie, nullValue) - 44usize];
};
impl Default for UCPTrie {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)]
pub enum UCPTrieType {
    UCPTRIE_TYPE_ANY = -1,
    UCPTRIE_TYPE_FAST = 0,
    UCPTRIE_TYPE_SMALL = 1,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)]
pub enum UCPTrieValueWidth {
    UCPTRIE_VALUE_BITS_ANY = -1,
    UCPTRIE_VALUE_BITS_16 = 0,
    UCPTRIE_VALUE_BITS_32 = 1,
    UCPTRIE_VALUE_BITS_8 = 2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct USet {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct UNewTrie2 {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq)]
pub struct UTrie2 {
    pub index: *const u16,
    pub data16: *const u16,
    pub data32: *const u32,
    pub indexLength: i32,
    pub dataLength: i32,
    pub index2NullOffset: u16,
    pub dataNullOffset: u16,
    pub initialValue: u32,
    pub errorValue: u32,
    pub highStart: UChar32,
    pub highValueIndex: i32,
    pub memory: *mut ::std::os::raw::c_void,
    pub length: i32,
    pub isMemoryOwned: UBool,
    pub padding1: UBool,
    pub padding2: i16,
    pub newTrie: *mut UNewTrie2,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of UTrie2"][::std::mem::size_of::<UTrie2>() - 80usize];
    ["Alignment of UTrie2"][::std::mem::align_of::<UTrie2>() - 8usize];
    ["Offset of field: UTrie2::index"][::std::mem::offset_of!(UTrie2, index) - 0usize];
    ["Offset of field: UTrie2::data16"][::std::mem::offset_of!(UTrie2, data16) - 8usize];
    ["Offset of field: UTrie2::data32"][::std::mem::offset_of!(UTrie2, data32) - 16usize];
    ["Offset of field: UTrie2::indexLength"][::std::mem::offset_of!(UTrie2, indexLength) - 24usize];
    ["Offset of field: UTrie2::dataLength"][::std::mem::offset_of!(UTrie2, dataLength) - 28usize];
    ["Offset of field: UTrie2::index2NullOffset"]
        [::std::mem::offset_of!(UTrie2, index2NullOffset) - 32usize];
    ["Offset of field: UTrie2::dataNullOffset"]
        [::std::mem::offset_of!(UTrie2, dataNullOffset) - 34usize];
    ["Offset of field: UTrie2::initialValue"]
        [::std::mem::offset_of!(UTrie2, initialValue) - 36usize];
    ["Offset of field: UTrie2::errorValue"][::std::mem::offset_of!(UTrie2, errorValue) - 40usize];
    ["Offset of field: UTrie2::highStart"][::std::mem::offset_of!(UTrie2, highStart) - 44usize];
    ["Offset of field: UTrie2::highValueIndex"]
        [::std::mem::offset_of!(UTrie2, highValueIndex) - 48usize];
    ["Offset of field: UTrie2::memory"][::std::mem::offset_of!(UTrie2, memory) - 56usize];
    ["Offset of field: UTrie2::length"][::std::mem::offset_of!(UTrie2, length) - 64usize];
    ["Offset of field: UTrie2::isMemoryOwned"]
        [::std::mem::offset_of!(UTrie2, isMemoryOwned) - 68usize];
    ["Offset of field: UTrie2::padding1"][::std::mem::offset_of!(UTrie2, padding1) - 69usize];
    ["Offset of field: UTrie2::padding2"][::std::mem::offset_of!(UTrie2, padding2) - 70usize];
    ["Offset of field: UTrie2::newTrie"][::std::mem::offset_of!(UTrie2, newTrie) - 72usize];
};
impl Default for UTrie2 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)]
pub enum UTargetSyntax {
    UPRV_TARGET_SYNTAX_CCODE = 0,
    UPRV_TARGET_SYNTAX_TOML = 1,
}
unsafe extern "C" {
    pub fn usrc_create(
        path: *const ::std::os::raw::c_char,
        filename: *const ::std::os::raw::c_char,
        copyrightYear: i32,
        generator: *const ::std::os::raw::c_char,
    ) -> *mut FILE;
}
unsafe extern "C" {
    pub fn usrc_createTextData(
        path: *const ::std::os::raw::c_char,
        filename: *const ::std::os::raw::c_char,
        copyrightYear: i32,
        generator: *const ::std::os::raw::c_char,
    ) -> *mut FILE;
}
unsafe extern "C" {
    pub fn usrc_writeCopyrightHeader(
        f: *mut FILE,
        prefix: *const ::std::os::raw::c_char,
        copyrightYear: i32,
    );
}
unsafe extern "C" {
    pub fn usrc_writeFileNameGeneratedBy(
        f: *mut FILE,
        prefix: *const ::std::os::raw::c_char,
        filename: *const ::std::os::raw::c_char,
        generator: *const ::std::os::raw::c_char,
    );
}
unsafe extern "C" {
    pub fn usrc_writeArray(
        f: *mut FILE,
        prefix: *const ::std::os::raw::c_char,
        p: *const ::std::os::raw::c_void,
        width: i32,
        length: i32,
        indent: *const ::std::os::raw::c_char,
        postfix: *const ::std::os::raw::c_char,
    );
}
unsafe extern "C" {
    pub fn usrc_writeUTrie2Arrays(
        f: *mut FILE,
        indexPrefix: *const ::std::os::raw::c_char,
        dataPrefix: *const ::std::os::raw::c_char,
        pTrie: *const UTrie2,
        postfix: *const ::std::os::raw::c_char,
    );
}
unsafe extern "C" {
    pub fn usrc_writeUTrie2Struct(
        f: *mut FILE,
        prefix: *const ::std::os::raw::c_char,
        pTrie: *const UTrie2,
        indexName: *const ::std::os::raw::c_char,
        dataName: *const ::std::os::raw::c_char,
        postfix: *const ::std::os::raw::c_char,
    );
}
unsafe extern "C" {
    pub fn usrc_writeUCPTrieArrays(
        f: *mut FILE,
        indexPrefix: *const ::std::os::raw::c_char,
        dataPrefix: *const ::std::os::raw::c_char,
        pTrie: *const UCPTrie,
        postfix: *const ::std::os::raw::c_char,
        syntax: UTargetSyntax,
    );
}
unsafe extern "C" {
    pub fn usrc_writeUCPTrieStruct(
        f: *mut FILE,
        prefix: *const ::std::os::raw::c_char,
        pTrie: *const UCPTrie,
        indexName: *const ::std::os::raw::c_char,
        dataName: *const ::std::os::raw::c_char,
        postfix: *const ::std::os::raw::c_char,
        syntax: UTargetSyntax,
    );
}
unsafe extern "C" {
    pub fn usrc_writeUCPTrie(
        f: *mut FILE,
        name: *const ::std::os::raw::c_char,
        pTrie: *const UCPTrie,
        syntax: UTargetSyntax,
    );
}
unsafe extern "C" {
    pub fn usrc_writeUnicodeSet(f: *mut FILE, pSet: *const USet, syntax: UTargetSyntax);
}
unsafe extern "C" {
    pub fn usrc_writeArrayOfMostlyInvChars(
        f: *mut FILE,
        prefix: *const ::std::os::raw::c_char,
        p: *const ::std::os::raw::c_char,
        length: i32,
        postfix: *const ::std::os::raw::c_char,
    );
}
unsafe extern "C" {
    pub fn usrc_writeStringAsASCII(
        f: *mut FILE,
        ptr: *const UChar,
        length: i32,
        syntax: UTargetSyntax,
    );
}