swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">onValue</span><span class="p">:</span> <span class="p">((</span><span class="kt">Element</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
            <span class="nv">onCompleted</span><span class="p">:</span> <span class="p">((</span><span class="kt">Error