
where

{%- if f.is_length_delimited %}

{%- if f.is_bytes %}
ScalarType: ::std::convert::AsRef<[u8]> + ::std::clone::Clone + ::std::cmp::PartialEq + ::std::fmt::Debug,
{%- endif %}

{%- if f.is_string %}
ScalarType: ::std::convert::AsRef<str> + ::std::clone::Clone + ::std::cmp::PartialEq + ::std::fmt::Debug,
{%- endif %}

{%- match f.trait_maybe_field_message_trait_path %}
{%- when Some with (field_msg_path) %}
ScalarType: {{ field_msg_path }} + ::std::clone::Clone + ::std::cmp::PartialEq + ::std::fmt::Debug,
{%- else %}
{%- endmatch %}

{%- else %} {#- if f.is_length_delimited #}

ScalarType: ::std::convert::Into<{{ f.single_numerical_rust_type }}> +
    ::std::clone::Clone + ::std::cmp::PartialEq + ::std::fmt::Debug,

{%- endif %} {#- if f.is_length_delimited #}

{%- if f.is_repeated %}
for <'a> &'a RepeatedType: ::std::iter::IntoIterator<
    Item = &'a ScalarType
>,
{%- endif %}
