1 use cxx::{type_id, ExternType};
2 
3 #[repr(transparent)]
4 pub struct QuotedRaw(usize);
5 
6 unsafe impl ExternType for QuotedRaw {
7     type Id = type_id!("org::r#box::implementation::QuotedRaw");
8     type Kind = cxx::kind::Trivial;
9 }
10 
11 #[repr(transparent)]
12 pub struct QuotedKeyword(usize);
13 
14 unsafe impl ExternType for QuotedKeyword {
15     type Id = type_id!("org::box::implementation::QuotedKeyword");
16     type Kind = cxx::kind::Trivial;
17 }
18 
19 #[repr(transparent)]
20 pub struct UnquotedRaw(usize);
21 
22 unsafe impl ExternType for UnquotedRaw {
23     type Id = type_id!(org::r#box::implementation::UnquotedRaw);
24     type Kind = cxx::kind::Trivial;
25 }
26 
27 #[repr(transparent)]
28 pub struct UnquotedKeyword(usize);
29 
30 unsafe impl ExternType for UnquotedKeyword {
31     type Id = type_id!(org::box::implementation::UnquotedKeyword);
32     type Kind = cxx::kind::Trivial;
33 }
34 
35 #[cxx::bridge]
36 pub mod ffi {
37     extern "C++" {
38         #[namespace = "org::r#box::implementation"]
39         type QuotedRaw = crate::QuotedRaw;
40 
41         #[namespace = "org::box::implementation"]
42         type QuotedKeyword = crate::QuotedKeyword;
43 
44         #[namespace = org::r#box::implementation]
45         type UnquotedRaw = crate::UnquotedRaw;
46 
47         // Not allowed by rustc (independent of cxx):
48         // #[namespace = org::box::implementation]
49         // type UnquotedKeyword = crate::UnquotedKeyword;
50     }
51 }
52 
main()53 fn main() {}
54