h3 id='generating-code-encode-to-code-method' class='heading'>Generating <code>encode(to:)</code> method.</h3>

<p>Template will generate implementation of <code>encode(to:)</code> method when needed. You can define additional methods to be used to encode it.</p>

<ul>
<li>method to get encoding container. This is useful if your type needs to be encoded into a nested key(s):</li>
</ul>
<pre class="highlight swift"><code><span class="kd">struct</span> <span class="kt">MyStruct</span><span class="p">:</span> 