Debian Codegraph @

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

raw
1 ---
2 source: macro/src/lib.rs
3 expression: "rustfmt_code(&gen_bridge(parse_quote! {\n mod ffi\n {\n struct Foo {} impl Foo\n {\n pub fn to_string(& self, to : & mut DiplomatWriteable) ->\n Result < (), () > { unimplemented! () }\n }\n }\n }).to_token_stream().to_string())"
4 ---
5 mod ffi {
6 #[repr(C)]
7 #[derive(Clone, Copy)]
8 struct Foo {}
9 impl Foo {
10 pub fn to_string(&self, to: &mut DiplomatWriteable) -> Result<(), ()> {
11 unimplemented!()
12 }
13 }
14 use diplomat_runtime::*;
15 #[no_mangle]
16 extern "C" fn Foo_to_string(
17 this: &Foo,
18 to: &mut diplomat_runtime::DiplomatWriteable,
19 ) -> diplomat_runtime::DiplomatResult<(), ()> {
20 let ret = this.to_string(to);
21 to.flush();
22 ret.into()
23 }
24 #[no_mangle]
25 extern "C" fn Foo_destroy(this: Box<Foo>) {}
26 }
27