
{#-
 # The default simple impl, which is using a same name with messages
 # (e.g. `message MyMessage` => `struct MyMessage`)
 # must be separated out to standalone namespace to avoid name conflict.
 #}
{%- for m in messages %}
pub use _puroro_simple_impl::{{ m.simple_ident }};
{%- endfor %}
pub mod _puroro_simple_impl {
    mod _puroro_root {
        pub use super::super::_puroro_root::*;
    }
    {%- for m in messages %}
    {%- include "simple/body.rs.txt" %}
    {%- endfor %}
}

pub use _puroro_impls::*;
pub mod _puroro_impls {
    mod _puroro_root {
        pub use super::super::_puroro_root::*;
    }

    {#- It is guaranteed that the trait idents will never conflict with structs names -#}
    use super::_puroro_traits::*;

    {%- for m in messages %}
    {%- include "single_field/body.rs.txt" %}
    {%- include "bumpalo/body.rs.txt" %}
    {%- include "builder.rs.txt" %}
    {%- endfor %}
}

{#- ################# Subroutines ################# -#}

{%- macro simple_trait_impl_field(f) -%}
{%- include "simple/trait_impl_field.rs.txt" %}
{%- endmacro -%}

{%- macro single_field_bound(f) -%}
{%- include "single_field/bound.rs.txt" %}
{%- endmacro -%}

{%- macro single_field_trait_impl_field(f) -%}
{%- include "single_field/trait_impl_field.rs.txt" %}
{%- endmacro -%}

{%- macro empty_trait_impl_field(f) -%}
{%- include "empty/trait_impl_field.rs.txt" %}
{%- endmacro -%}

{%- macro bumpalo_trait_impl_field(f) -%}
{%- include "bumpalo/trait_impl_field.rs.txt" %}
{%- endmacro -%}

