{% import "macros.rs" as rs %}
::uniffi::setup_scaffolding!("{{ ci.namespace() }}");
{% include "UdlMetadata.rs" %}
{% for ty in ci.iter_local_types() %}
{%- match ty %}
{%- when Type::Map { key_type: k, value_type: v } -%}
{# Next comment MUST be after the line to be in the compiler output #}
uniffi::deps::static_assertions::assert_impl_all!({{ k|type_rs }}: ::std::cmp::Eq, ::std::hash::Hash); {%- else %}
{%- endmatch %}
{% endfor %}
{% for e in ci.enum_definitions() %}
{% if ci.is_name_used_as_error(e.name()) %}
{% include "ErrorTemplate.rs" %}
{% else %}
{% include "EnumTemplate.rs" %}
{% endif %}
{% endfor %}
{% for rec in ci.record_definitions() %}
{% include "RecordTemplate.rs" %}
{% endfor %}
{%- for func in ci.function_definitions() %}
{% include "TopLevelFunctionTemplate.rs" %}
{% endfor -%}
{% for obj in ci.object_definitions() %}
{% include "ObjectTemplate.rs" %}
{% endfor %}
{% for cbi in ci.callback_interface_definitions() %}
{% include "CallbackInterfaceTemplate.rs" %}
{% endfor %}
{% include "Checksums.rs" %}