summaryrefslogtreecommitdiffstats
path: root/src/librustdoc/html/templates/item_union.html
blob: c2196700513326a5970f87271514b48e1c55aad6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<pre class="rust item-decl"><code>
    {{ self::item_template_render_attributes_in_pre(self.borrow()) | safe }}
    {{ self.render_union() | safe }}
</code></pre>
{{ self::item_template_document(self.borrow()) | safe }}
{% if self.fields_iter().peek().is_some() %}
    <h2 id="fields" class="fields small-section-header">
        Fields<a href="#fields" class="anchor">§</a>
    </h2>
    {% for (field, ty) in self.fields_iter() %}
        {% let name = field.name.expect("union field name") %}
        <span id="structfield.{{ name }}" class="{{ ItemType::StructField }} small-section-header">
            <a href="#structfield.{{ name }}" class="anchor field">§</a>
            <code>{{ name }}: {{ self.print_ty(ty) | safe }}</code>
        </span>
        {% if let Some(stability_class) = self.stability_field(field) %}
            <span class="stab {{ stability_class }}"></span>
        {% endif %}
        {{ self.document_field(field) | safe }}
    {% endfor %}
{% endif %}
{{ self::item_template_render_assoc_items(self.borrow()) | safe }}
{{ self::item_template_document_type_layout(self.borrow()) | safe }}