| 1 |
// This file was autogenerated by some hot garbage in the `uniffi` crate. |
| 2 |
// Trust me, you don't want to mess with it! |
| 3 |
{% import "macros.rs" as rs %} |
| 4 |
|
| 5 |
::uniffi::setup_scaffolding!("{{ ci.namespace() }}"); |
| 6 |
|
| 7 |
{% include "UdlMetadata.rs" %} |
| 8 |
|
| 9 |
{% for ty in ci.iter_local_types() %} |
| 10 |
{%- match ty %} |
| 11 |
{%- when Type::Map { key_type: k, value_type: v } -%} |
| 12 |
{# Next comment MUST be after the line to be in the compiler output #} |
| 13 |
uniffi::deps::static_assertions::assert_impl_all!({{ k|type_rs }}: ::std::cmp::Eq, ::std::hash::Hash); // record<{{ k|type_rs }}, {{ v|type_rs }}> |
| 14 |
{%- else %} |
| 15 |
{%- endmatch %} |
| 16 |
{% endfor %} |
| 17 |
|
| 18 |
{% for e in ci.enum_definitions() %} |
| 19 |
{% if ci.is_name_used_as_error(e.name()) %} |
| 20 |
// Error definitions, corresponding to `error` in the UDL. |
| 21 |
{% include "ErrorTemplate.rs" %} |
| 22 |
{% else %} |
| 23 |
// Enum definitions, corresponding to `enum` in UDL. |
| 24 |
{% include "EnumTemplate.rs" %} |
| 25 |
{% endif %} |
| 26 |
{% endfor %} |
| 27 |
|
| 28 |
// Record definitions, implemented as method-less structs, corresponding to `dictionary` objects. |
| 29 |
{% for rec in ci.record_definitions() %} |
| 30 |
{% include "RecordTemplate.rs" %} |
| 31 |
{% endfor %} |
| 32 |
|
| 33 |
// Top level functions, corresponding to UDL `namespace` functions. |
| 34 |
{%- for func in ci.function_definitions() %} |
| 35 |
{% include "TopLevelFunctionTemplate.rs" %} |
| 36 |
{% endfor -%} |
| 37 |
|
| 38 |
// Object definitions, corresponding to UDL `interface` definitions. |
| 39 |
{% for obj in ci.object_definitions() %} |
| 40 |
{% include "ObjectTemplate.rs" %} |
| 41 |
{% endfor %} |
| 42 |
|
| 43 |
// Callback Interface definitions, corresponding to UDL `callback interface` definitions. |
| 44 |
{% for cbi in ci.callback_interface_definitions() %} |
| 45 |
{% include "CallbackInterfaceTemplate.rs" %} |
| 46 |
{% endfor %} |
| 47 |
|
| 48 |
// Export scaffolding checksums for UDL items |
| 49 |
{% include "Checksums.rs" %} |