• 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                                {\n                                    pub fn something_with_str(s: Box<str>) { unimplemented!() }\n                                }\n                            }\n                        }).to_token_stream().to_string())"
4---
5mod ffi {
6    #[repr(C)]
7    struct Foo {}
8    impl Foo {
9        pub fn something_with_str(s: Box<str>) {
10            unimplemented!()
11        }
12    }
13    use core::ffi::c_void;
14    use diplomat_runtime::*;
15    #[no_mangle]
16    extern "C" fn Foo_something_with_str(s: diplomat_runtime::DiplomatOwnedUTF8StrSlice) {
17        let s = s.into();
18        Foo::something_with_str(s)
19    }
20}
21