Debian Codegraph @

third_party/rust/diplomat/src/snapshots/diplomat__tests__mod_with_enum.snap

raw
1 ---
2 source: macro/src/lib.rs
3 expression: "rustfmt_code(&gen_bridge(parse_quote! {\n mod ffi\n {\n enum Abc { A, B = 123, } impl Abc\n { pub fn do_something(& self) { unimplemented! () } }\n }\n }).to_token_stream().to_string())"
4 ---
5 mod ffi {
6 #[repr(C)]
7 #[derive(Clone, Copy)]
8 enum Abc {
9 A,
10 B = 123,
11 }
12 impl Abc {
13 pub fn do_something(&self) {
14 unimplemented!()
15 }
16 }
17 use diplomat_runtime::*;
18 #[no_mangle]
19 extern "C" fn Abc_do_something(this: &Abc) {
20 this.do_something()
21 }
22 #[no_mangle]
23 extern "C" fn Abc_destroy(this: Box<Abc>) {}
24 }
25