{% extends "base.html.tera" %}
{% import "macros.tera" as macros %}
{% block content %}
<h1>Module <code>{{ module.name }}</code></h1>
<hr>
{{ module.summary }}
{% if imports %}
<h2>Imports</h2>
<hr>
{% for imp in imports %}
<li>
<i>{{ imp.path }}</i> as <code>
{% if imp.registered %}
<a href="{{ assets_subpath }}/modules/{{ imp.module_name }}/index.html">{{ imp.name }}</a>
{% else %}
{{ imp.name }}
{% endif %}
</code>
{% if imp.docs %}
<br>
{{ imp.docs }}
{% endif %}
</li>
{% endfor %}
{% endif %}
{% if bindings %}
<h2>Bindings</h2>
<hr>
<table>
<thead>
<tr>
<th>Group</th>
<th>Binding</th>
<th>Name</th>
<th>Type</th>
</tr>
</thead>
<tbody>
{% for binding in bindings %}
<tr>
<td>
<strong>{{ binding.attr_group }}</strong>
</td>
<td>
<strong>{{ binding.attr_binding }}</strong>
</td>
<td>
<strong>{{ binding.name }}</strong>
{% if binding.docs %}
<br>
<small>{{ binding.docs }}</small>
{% endif %}
</td>
<td>
{{ macros::render_type(type=binding.ty) }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if constants %}
<h2>Constants</h2>
<hr>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Value</th>
</tr>
</thead>
<tbody>
{% for const in constants %}
<tr>
<td>
<strong>{{ const.name }}</strong>
{% if const.docs %}
<br>
<small>{{ const.docs }}</small>
{% endif %}
</td>
<td>
{% if const.ty %}
{{ macros::render_type(type=const.ty) }}
{% else %}
(infer)
{% endif %}
</td>
<td>{{ const.value }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if functions %}
<h2>Functions</h2>
<hr>
{% for function in functions %}
{% if function.summary %}
<li><code><a href="{{ assets_subpath }}/modules/{{ module.name }}/fn.{{ function.name }}.html">{{ function.name }}</a></code> - {{ function.summary }}</li>
{% else %}
<li><code><a href="{{ assets_subpath }}/modules/{{ module.name }}/fn.{{ function.name }}.html">{{ function.name }}</a></code></li>
{% endif %}
{% endfor %}
{% endif %}
{% if structures %}
<h2>Structures</h2>
<hr>
{% for structure in structures %}
{% if structure.summary %}
<li><code><a href="{{ assets_subpath }}/modules/{{ module.name }}/struct.{{ structure.name }}.html">{{ structure.name }}</a></code> - {{ structure.summary }}</li>
{% else %}
<li><code><a href="{{ assets_subpath }}/modules/{{ module.name }}/struct.{{ structure.name }}.html">{{ structure.name }}</a></code></li>
{% endif %}
{% endfor %}
{% endif %}
{% endblock content %}