Debian Codegraph @

third_party/rust/uniffi_bindgen/src/scaffolding/templates/RecordTemplate.rs

raw
1 {#
2 // Forward work to `uniffi_macros` This keeps macro-based and UDL-based generated code consistent.
3 #}
4
5 {%- if rec.remote() %}
6 #[::uniffi::udl_remote(Record)]
7 {%- else %}
8 #[::uniffi::udl_derive(Record)]
9 {%- endif %}
10 struct r#{{ rec.name() }} {
11 {%- for field in rec.fields() %}
12 r#{{ field.name() }}: {{ field.as_type().borrow()|type_rs }},
13 {%- endfor %}
14 }