• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2source: macro/src/lib.rs
3expression: "rustfmt_code(&gen_bridge(parse_quote! {\n                            mod ffi\n                            {\n                                struct Foo {} impl Foo\n                                { pub fn from_str(s: &DiplomatStr) { unimplemented!() } }\n                            }\n                        }).to_token_stream().to_string())"
4---
5mod ffi {
6    #[repr(C)]
7    struct Foo {}
8    impl Foo {
9        pub fn from_str(s: &DiplomatStr) {
10            unimplemented!()
11        }
12    }
13    use core::ffi::c_void;
14    use diplomat_runtime::*;
15    #[no_mangle]
16    extern "C" fn Foo_from_str(s: diplomat_runtime::DiplomatStrSlice) {
17        let s = s.into();
18        Foo::from_str(s)
19    }
20}
21