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 bar(&self) -> Result<(), ()> { unimplemented!() } }\n }\n }).to_token_stream().to_string())" 4--- 5mod ffi { 6 #[repr(C)] 7 struct Foo {} 8 impl Foo { 9 pub fn bar(&self) -> Result<(), ()> { 10 unimplemented!() 11 } 12 } 13 use core::ffi::c_void; 14 use diplomat_runtime::*; 15 #[no_mangle] 16 extern "C" fn Foo_bar(this: &Foo) -> diplomat_runtime::DiplomatResult<(), ()> { 17 this.bar().into() 18 } 19} 20