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
#[cxx::bridge]
pub mod ffi {
unsafe extern "C++" {
include!("cxx-qt-lib/qset.h");
type QSet_bool = crate::QSet<bool>;
}
unsafe extern "C++" {
#[rust_name = "cxx_clear"]
fn clear(self: &mut QSet_bool);
#[rust_name = "cxx_contains"]
fn contains(self: &QSet_bool, _: &bool) -> bool;
#[rust_name = "cxx_remove"]
fn remove(self: &mut QSet_bool, _: &bool) -> bool;
}
#[namespace = "rust::cxxqtlib1"]
unsafe extern "C++" {
include!("cxx-qt-lib/common.h");
#[rust_name = "qset_clone_bool"]
fn construct(_: &QSet_bool) -> QSet_bool;
#[rust_name = "qset_default_bool"]
fn construct() -> QSet_bool;
#[rust_name = "qset_drop_bool"]
fn drop(_: &mut QSet_bool);
}
#[namespace = "rust::cxxqtlib1::qset"]
unsafe extern "C++" {
#[rust_name = "get_unchecked_bool"]
#[allow(clippy::needless_lifetimes)]
unsafe fn qsetGetUnchecked<'a>(set: &'a QSet_bool, pos: isize) -> &'a bool;
#[rust_name = "insert_bool"]
fn qsetInsert(_: &mut QSet_bool, _: &bool);
#[rust_name = "len_bool"]
fn qsetLen(_: &QSet_bool) -> isize;
}
}
pub(crate) fn clone(s: &ffi::QSet_bool) -> ffi::QSet_bool {
ffi::qset_clone_bool(s)
}
pub(crate) fn default() -> ffi::QSet_bool {
ffi::qset_default_bool()
}
pub(crate) fn drop(s: &mut ffi::QSet_bool) {
ffi::qset_drop_bool(s);
}
pub(crate) unsafe fn get_unchecked(s: &ffi::QSet_bool, pos: isize) -> &bool {
ffi::get_unchecked_bool(s, pos)
}
pub(crate) fn insert(s: &mut ffi::QSet_bool, value: &bool) {
ffi::insert_bool(s, value);
}
pub(crate) fn len(s: &ffi::QSet_bool) -> isize {
ffi::len_bool(s)
}