Skip to content

Commit

Permalink
Update documentation (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
reddavis authored May 17, 2022
1 parent 16d4009 commit 27d0f57
Show file tree
Hide file tree
Showing 83 changed files with 4,374 additions and 364 deletions.
30 changes: 21 additions & 9 deletions .documentation/Actors.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
<li class="nav-group-task">
<a href="Extensions/AsyncThrowingStream/Continuation.html">– Continuation</a>
</li>
<li class="nav-group-task">
<a href="Extensions/Sequence.html">Sequence</a>
</li>
<li class="nav-group-task">
<a href="Extensions/Task.html">Task</a>
</li>
Expand All @@ -91,6 +94,9 @@
<li class="nav-group-task">
<a href="Structs/AnyThrowingAsyncSequenceable.html">AnyThrowingAsyncSequenceable</a>
</li>
<li class="nav-group-task">
<a href="Structs/ChainAsyncSequence.html">ChainAsyncSequence</a>
</li>
<li class="nav-group-task">
<a href="Structs/CombineLatest3AsyncSequence.html">CombineLatest3AsyncSequence</a>
</li>
Expand Down Expand Up @@ -127,6 +133,12 @@
<li class="nav-group-task">
<a href="Structs/ReplaceErrorAsyncSequence.html">ReplaceErrorAsyncSequence</a>
</li>
<li class="nav-group-task">
<a href="Structs/SequenceAsyncSequence.html">SequenceAsyncSequence</a>
</li>
<li class="nav-group-task">
<a href="Structs/SequenceAsyncSequenceIterator.html">SequenceAsyncSequenceIterator</a>
</li>
<li class="nav-group-task">
<a href="Structs/SharedAsyncSequence.html">SharedAsyncSequence</a>
</li>
Expand Down Expand Up @@ -171,15 +183,15 @@ <h1>Actors</h1>
<div class="abstract">
<p>A async sequence that wraps a single value and emits a new element whenever the element changes.</p>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">sequence</span> <span class="o">=</span> <span class="kt">CurrentElementAsyncSequence</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="nf">print</span><span class="p">(</span><span class="n">await</span> <span class="n">sequence</span><span class="o">.</span><span class="n">element</span><span class="p">)</span>
<span class="nf">print</span><span class="p">(</span><span class="k">await</span> <span class="n">sequence</span><span class="o">.</span><span class="n">element</span><span class="p">)</span>

<span class="n">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="nf">print</span><span class="p">(</span><span class="n">await</span> <span class="n">sequence</span><span class="o">.</span><span class="n">element</span><span class="p">)</span>
<span class="k">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="nf">print</span><span class="p">(</span><span class="k">await</span> <span class="n">sequence</span><span class="o">.</span><span class="n">element</span><span class="p">)</span>

<span class="n">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="n">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
<span class="n">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span>
<span class="nf">print</span><span class="p">(</span><span class="n">await</span> <span class="n">sequence</span><span class="o">.</span><span class="n">element</span><span class="p">)</span>
<span class="k">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="k">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
<span class="k">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span>
<span class="nf">print</span><span class="p">(</span><span class="k">await</span> <span class="n">sequence</span><span class="o">.</span><span class="n">element</span><span class="p">)</span>

<span class="c1">// Prints:</span>
<span class="c1">// 0</span>
Expand All @@ -193,7 +205,7 @@ <h1>Actors</h1>
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="n">actor</span> <span class="kt">CurrentElementAsyncSequence</span><span class="o">&lt;</span><span class="kt">Element</span><span class="o">&gt;</span> <span class="p">:</span> <span class="kt">AsyncSequence</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">actor</span> <span class="kt">CurrentElementAsyncSequence</span><span class="o">&lt;</span><span class="kt">Element</span><span class="o">&gt;</span> <span class="p">:</span> <span class="kt">AsyncSequence</span></code></pre>

</div>
</div>
Expand All @@ -205,7 +217,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2022 <a class="link" href="" target="_blank" rel="external noopener"></a>. All rights reserved. (Last updated: 2022-03-21)</p>
<p>&copy; 2022 <a class="link" href="" target="_blank" rel="external noopener"></a>. All rights reserved. (Last updated: 2022-05-17)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</article>
Expand Down
32 changes: 22 additions & 10 deletions .documentation/Actors/CurrentElementAsyncSequence.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
<li class="nav-group-task">
<a href="../Extensions/AsyncThrowingStream/Continuation.html">– Continuation</a>
</li>
<li class="nav-group-task">
<a href="../Extensions/Sequence.html">Sequence</a>
</li>
<li class="nav-group-task">
<a href="../Extensions/Task.html">Task</a>
</li>
Expand All @@ -91,6 +94,9 @@
<li class="nav-group-task">
<a href="../Structs/AnyThrowingAsyncSequenceable.html">AnyThrowingAsyncSequenceable</a>
</li>
<li class="nav-group-task">
<a href="../Structs/ChainAsyncSequence.html">ChainAsyncSequence</a>
</li>
<li class="nav-group-task">
<a href="../Structs/CombineLatest3AsyncSequence.html">CombineLatest3AsyncSequence</a>
</li>
Expand Down Expand Up @@ -127,6 +133,12 @@
<li class="nav-group-task">
<a href="../Structs/ReplaceErrorAsyncSequence.html">ReplaceErrorAsyncSequence</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SequenceAsyncSequence.html">SequenceAsyncSequence</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SequenceAsyncSequenceIterator.html">SequenceAsyncSequenceIterator</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SharedAsyncSequence.html">SharedAsyncSequence</a>
</li>
Expand All @@ -153,21 +165,21 @@ <h1>CurrentElementAsyncSequence</h1>
<div class="declaration">
<div class="language">

<pre class="highlight swift"><code><span class="kd">public</span> <span class="n">actor</span> <span class="kt">CurrentElementAsyncSequence</span><span class="o">&lt;</span><span class="kt">Element</span><span class="o">&gt;</span> <span class="p">:</span> <span class="kt">AsyncSequence</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">actor</span> <span class="kt">CurrentElementAsyncSequence</span><span class="o">&lt;</span><span class="kt">Element</span><span class="o">&gt;</span> <span class="p">:</span> <span class="kt">AsyncSequence</span></code></pre>

</div>
</div>
<p>A async sequence that wraps a single value and emits a new element whenever the element changes.</p>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">sequence</span> <span class="o">=</span> <span class="kt">CurrentElementAsyncSequence</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="nf">print</span><span class="p">(</span><span class="n">await</span> <span class="n">sequence</span><span class="o">.</span><span class="n">element</span><span class="p">)</span>
<span class="nf">print</span><span class="p">(</span><span class="k">await</span> <span class="n">sequence</span><span class="o">.</span><span class="n">element</span><span class="p">)</span>

<span class="n">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="nf">print</span><span class="p">(</span><span class="n">await</span> <span class="n">sequence</span><span class="o">.</span><span class="n">element</span><span class="p">)</span>
<span class="k">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="nf">print</span><span class="p">(</span><span class="k">await</span> <span class="n">sequence</span><span class="o">.</span><span class="n">element</span><span class="p">)</span>

<span class="n">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="n">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
<span class="n">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span>
<span class="nf">print</span><span class="p">(</span><span class="n">await</span> <span class="n">sequence</span><span class="o">.</span><span class="n">element</span><span class="p">)</span>
<span class="k">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="k">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
<span class="k">await</span> <span class="n">stream</span><span class="o">.</span><span class="nf">yield</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span>
<span class="nf">print</span><span class="p">(</span><span class="k">await</span> <span class="n">sequence</span><span class="o">.</span><span class="n">element</span><span class="p">)</span>

<span class="c1">// Prints:</span>
<span class="c1">// 0</span>
Expand Down Expand Up @@ -298,7 +310,7 @@ <h3 class="section-name"><span>AsyncSequence</span>
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="n">nonisolated</span> <span class="kd">public</span> <span class="kd">func</span> <span class="nf">makeAsyncIterator</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt">AsyncStream</span><span class="o">&lt;</span><span class="kt">Element</span><span class="o">&gt;.</span><span class="kt">Iterator</span></code></pre>
<pre class="highlight swift"><code><span class="kd">nonisolated</span> <span class="kd">public</span> <span class="kd">func</span> <span class="nf">makeAsyncIterator</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt">AsyncStream</span><span class="o">&lt;</span><span class="kt">Element</span><span class="o">&gt;.</span><span class="kt">Iterator</span></code></pre>

</div>
</div>
Expand Down Expand Up @@ -453,7 +465,7 @@ <h4>Parameters</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2022 <a class="link" href="" target="_blank" rel="external noopener"></a>. All rights reserved. (Last updated: 2022-03-21)</p>
<p>&copy; 2022 <a class="link" href="" target="_blank" rel="external noopener"></a>. All rights reserved. (Last updated: 2022-05-17)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</article>
Expand Down
16 changes: 14 additions & 2 deletions .documentation/Classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
<li class="nav-group-task">
<a href="Extensions/AsyncThrowingStream/Continuation.html">– Continuation</a>
</li>
<li class="nav-group-task">
<a href="Extensions/Sequence.html">Sequence</a>
</li>
<li class="nav-group-task">
<a href="Extensions/Task.html">Task</a>
</li>
Expand All @@ -91,6 +94,9 @@
<li class="nav-group-task">
<a href="Structs/AnyThrowingAsyncSequenceable.html">AnyThrowingAsyncSequenceable</a>
</li>
<li class="nav-group-task">
<a href="Structs/ChainAsyncSequence.html">ChainAsyncSequence</a>
</li>
<li class="nav-group-task">
<a href="Structs/CombineLatest3AsyncSequence.html">CombineLatest3AsyncSequence</a>
</li>
Expand Down Expand Up @@ -127,6 +133,12 @@
<li class="nav-group-task">
<a href="Structs/ReplaceErrorAsyncSequence.html">ReplaceErrorAsyncSequence</a>
</li>
<li class="nav-group-task">
<a href="Structs/SequenceAsyncSequence.html">SequenceAsyncSequence</a>
</li>
<li class="nav-group-task">
<a href="Structs/SequenceAsyncSequenceIterator.html">SequenceAsyncSequenceIterator</a>
</li>
<li class="nav-group-task">
<a href="Structs/SharedAsyncSequence.html">SharedAsyncSequence</a>
</li>
Expand Down Expand Up @@ -173,7 +185,7 @@ <h1>Classes</h1>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">sequence</span> <span class="o">=</span> <span class="kt">TimerAsyncSequence</span><span class="p">(</span><span class="nv">interval</span><span class="p">:</span> <span class="mi">1</span><span class="p">)</span>

<span class="k">let</span> <span class="nv">start</span> <span class="o">=</span> <span class="kt">Date</span><span class="o">.</span><span class="n">now</span>
<span class="k">for</span> <span class="n">element</span> <span class="k">in</span> <span class="n">await</span> <span class="n">sequence</span> <span class="p">{</span>
<span class="k">for</span> <span class="n">element</span> <span class="k">in</span> <span class="k">await</span> <span class="n">sequence</span> <span class="p">{</span>
<span class="nf">print</span><span class="p">(</span><span class="n">element</span><span class="p">)</span>
<span class="p">}</span>

Expand Down Expand Up @@ -201,7 +213,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2022 <a class="link" href="" target="_blank" rel="external noopener"></a>. All rights reserved. (Last updated: 2022-03-21)</p>
<p>&copy; 2022 <a class="link" href="" target="_blank" rel="external noopener"></a>. All rights reserved. (Last updated: 2022-05-17)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</article>
Expand Down
16 changes: 14 additions & 2 deletions .documentation/Classes/TimerAsyncSequence.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
<li class="nav-group-task">
<a href="../Extensions/AsyncThrowingStream/Continuation.html">– Continuation</a>
</li>
<li class="nav-group-task">
<a href="../Extensions/Sequence.html">Sequence</a>
</li>
<li class="nav-group-task">
<a href="../Extensions/Task.html">Task</a>
</li>
Expand All @@ -91,6 +94,9 @@
<li class="nav-group-task">
<a href="../Structs/AnyThrowingAsyncSequenceable.html">AnyThrowingAsyncSequenceable</a>
</li>
<li class="nav-group-task">
<a href="../Structs/ChainAsyncSequence.html">ChainAsyncSequence</a>
</li>
<li class="nav-group-task">
<a href="../Structs/CombineLatest3AsyncSequence.html">CombineLatest3AsyncSequence</a>
</li>
Expand Down Expand Up @@ -127,6 +133,12 @@
<li class="nav-group-task">
<a href="../Structs/ReplaceErrorAsyncSequence.html">ReplaceErrorAsyncSequence</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SequenceAsyncSequence.html">SequenceAsyncSequence</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SequenceAsyncSequenceIterator.html">SequenceAsyncSequenceIterator</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SharedAsyncSequence.html">SharedAsyncSequence</a>
</li>
Expand Down Expand Up @@ -161,7 +173,7 @@ <h1>TimerAsyncSequence</h1>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">sequence</span> <span class="o">=</span> <span class="kt">TimerAsyncSequence</span><span class="p">(</span><span class="nv">interval</span><span class="p">:</span> <span class="mi">1</span><span class="p">)</span>

<span class="k">let</span> <span class="nv">start</span> <span class="o">=</span> <span class="kt">Date</span><span class="o">.</span><span class="n">now</span>
<span class="k">for</span> <span class="n">element</span> <span class="k">in</span> <span class="n">await</span> <span class="n">sequence</span> <span class="p">{</span>
<span class="k">for</span> <span class="n">element</span> <span class="k">in</span> <span class="k">await</span> <span class="n">sequence</span> <span class="p">{</span>
<span class="nf">print</span><span class="p">(</span><span class="n">element</span><span class="p">)</span>
<span class="p">}</span>

Expand Down Expand Up @@ -350,7 +362,7 @@ <h4>Return Value</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2022 <a class="link" href="" target="_blank" rel="external noopener"></a>. All rights reserved. (Last updated: 2022-03-21)</p>
<p>&copy; 2022 <a class="link" href="" target="_blank" rel="external noopener"></a>. All rights reserved. (Last updated: 2022-05-17)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</article>
Expand Down
Loading

0 comments on commit 27d0f57

Please sign in to comment.