-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CurrentElementAsyncSequence (#9)
* Add CurrentElementAsyncSequence * Update readme * Update documentation
- Loading branch information
Showing
62 changed files
with
1,882 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Actors Reference</title> | ||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" /> | ||
<link rel="stylesheet" type="text/css" href="css/highlight.css" /> | ||
<meta charset='utf-8'> | ||
<script src="js/jquery.min.js" defer></script> | ||
<script src="js/jazzy.js" defer></script> | ||
|
||
<script src="js/lunr.min.js" defer></script> | ||
<script src="js/typeahead.jquery.js" defer></script> | ||
<script src="js/jazzy.search.js" defer></script> | ||
</head> | ||
<body> | ||
<a name="//apple_ref/swift/Section/Actors" class="dashAnchor"></a> | ||
<a title="Actors Reference"></a> | ||
<header> | ||
<div class="content-wrapper"> | ||
<p><a href="index.html"> Docs</a> (99% documented)</p> | ||
<div class="header-right"> | ||
<form role="search" action="search.json"> | ||
<input type="text" placeholder="Search documentation" data-typeahead> | ||
</form> | ||
</div> | ||
</div> | ||
</header> | ||
<div class="content-wrapper"> | ||
<p id="breadcrumbs"> | ||
<a href="index.html"> Reference</a> | ||
<img id="carat" src="img/carat.png" alt=""/> | ||
Actors Reference | ||
</p> | ||
</div> | ||
<div class="content-wrapper"> | ||
<nav class="sidebar"> | ||
<ul class="nav-groups"> | ||
<li class="nav-group-name"> | ||
<a href="Actors.html">Actors</a> | ||
<ul class="nav-group-tasks"> | ||
<li class="nav-group-task"> | ||
<a href="Actors/CurrentElementAsyncSequence.html">CurrentElementAsyncSequence</a> | ||
</li> | ||
</ul> | ||
</li> | ||
<li class="nav-group-name"> | ||
<a href="Extensions.html">Extensions</a> | ||
<ul class="nav-group-tasks"> | ||
<li class="nav-group-task"> | ||
<a href="Extensions/AsyncSequence.html">AsyncSequence</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Extensions/AsyncStream.html">AsyncStream</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Extensions/AsyncStream/Continuation.html">– Continuation</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Extensions/AsyncThrowingStream.html">AsyncThrowingStream</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Extensions/AsyncThrowingStream/Continuation.html">– Continuation</a> | ||
</li> | ||
</ul> | ||
</li> | ||
<li class="nav-group-name"> | ||
<a href="Structs.html">Structures</a> | ||
<ul class="nav-group-tasks"> | ||
<li class="nav-group-task"> | ||
<a href="Structs/AnyAsyncSequenceable.html">AnyAsyncSequenceable</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/AnyThrowingAsyncSequenceable.html">AnyThrowingAsyncSequenceable</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/CombineLatest3AsyncSequence.html">CombineLatest3AsyncSequence</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/CombineLatestAsyncSequence.html">CombineLatestAsyncSequence</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/DebounceAsyncSequence.html">DebounceAsyncSequence</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/Fail.html">Fail</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/Just.html">Just</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/Merge3AsyncSequence.html">Merge3AsyncSequence</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/MergeAsyncSequence.html">MergeAsyncSequence</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/PassthroughAsyncSequence.html">PassthroughAsyncSequence</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/RemoveDuplicatesAsyncSequence.html">RemoveDuplicatesAsyncSequence</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/ReplaceErrorAsyncSequence.html">ReplaceErrorAsyncSequence</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/SharedAsyncSequence.html">SharedAsyncSequence</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/ThrottleAsyncSequence.html">ThrottleAsyncSequence</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/ThrowingPassthroughAsyncSequence.html">ThrowingPassthroughAsyncSequence</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/Zip3AsyncSequence.html">Zip3AsyncSequence</a> | ||
</li> | ||
<li class="nav-group-task"> | ||
<a href="Structs/ZipAsyncSequence.html">ZipAsyncSequence</a> | ||
</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</nav> | ||
<article class="main-content"> | ||
<section> | ||
<section class="section"> | ||
<h1>Actors</h1> | ||
<p>The following actors are available globally.</p> | ||
|
||
</section> | ||
<section class="section task-group-section"> | ||
<div class="task-group"> | ||
<ul> | ||
<li class="item"> | ||
<div> | ||
<code> | ||
<a name="/s:10Asynchrone27CurrentElementAsyncSequenceC"></a> | ||
<a name="//apple_ref/swift/Actor/CurrentElementAsyncSequence" class="dashAnchor"></a> | ||
<a class="token" href="#/s:10Asynchrone27CurrentElementAsyncSequenceC">CurrentElementAsyncSequence</a> | ||
</code> | ||
</div> | ||
<div class="height-container"> | ||
<div class="pointer-container"></div> | ||
<section class="section"> | ||
<div class="pointer"></div> | ||
<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="k">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="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> | ||
<span class="c1">// 1</span> | ||
<span class="c1">// 4</span> | ||
</code></pre> | ||
|
||
<a href="Actors/CurrentElementAsyncSequence.html" class="slightly-smaller">See more</a> | ||
</div> | ||
<div class="declaration"> | ||
<h4>Declaration</h4> | ||
<div class="language"> | ||
<p class="aside-title">Swift</p> | ||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">actor</span> <span class="kt">CurrentElementAsyncSequence</span><span class="o"><</span><span class="kt">Element</span><span class="o">></span> <span class="p">:</span> <span class="kt">AsyncSequence</span></code></pre> | ||
|
||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
</section> | ||
</section> | ||
<section id="footer"> | ||
<p>© 2022 <a class="link" href="" target="_blank" rel="external noopener"></a>. All rights reserved. (Last updated: 2022-01-07)</p> | ||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p> | ||
</section> | ||
</article> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.