1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-05-14 04:20:08 +00:00
This commit is contained in:
InsanusMokrassar
2026-03-08 09:19:00 +00:00
parent 9482208aeb
commit 2e9c45ddb0
9397 changed files with 62245 additions and 67195 deletions

View File

@@ -95,7 +95,7 @@
<div class="cover ">
<h1 class="cover"><span>first</span><wbr><span><span>Of</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":tgbotapi.core:dokkaHtmlPartial/commonMain"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><span class="token operator">&lt;</span><a href="first-of.html">T</a><span class="token operator">&gt; </span><a href="first-of.html"><span class="token function">firstOf</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter "><span class="token keyword">vararg </span>deferreds<span class="token operator">: </span><span class="token keyword">suspend </span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="first-of.html">T</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="first-of.html">T</a></div><p class="paragraph">Executes the given suspend producers in parallel and returns the first successfully produced value.</p><p class="paragraph">This is a non-nullable variant of <a href="first-of-or-null.html">firstOfOrNull</a>. If no producer yields a value, it throws an <a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html">IllegalStateException</a>.</p><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">the first successfully produced value</p></span><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain" data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>T</span></span></u></div></span></div><div><div class="title"><p class="paragraph">the type of the produced value</p></div></div></div></div><div class="table-row" data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain" data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>deferreds</span></span></u></div></span></div><div><div class="title"><p class="paragraph">suspend producers that are started in parallel</p></div></div></div></div></div><h4 class="">Throws</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain" data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html"><span>Illegal</span><wbr><span>State</span><wbr><span><span>Exception</span></span></a></div></span></div><div><div class="title"><p class="paragraph">if none of the producers yielded a value</p></div></div></div></div><div class="table-row" data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain" data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.coroutines.cancellation/-cancellation-exception/index.html"><span>Cancellation</span><wbr><span><span>Exception</span></span></a></div></span></div><div><div class="title"><p class="paragraph">if the coroutine scope is cancelled or any producer throws it</p></div></div></div></div></div></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":tgbotapi.core:dokkaHtmlPartial/commonMain"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><span class="token operator">&lt;</span><a href="first-of.html">T</a><span class="token operator">&gt; </span><a href="first-of.html"><span class="token function">firstOf</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter "><span class="token keyword">vararg </span>deferreds<span class="token operator">: </span><span class="token keyword">suspend </span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="first-of.html">T</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="first-of.html">T</a></div><p class="paragraph">Executes the given suspend producers in parallel and returns the first successfully produced value.</p><p class="paragraph">This is a non-nullable variant of <a href="first-of-or-null.html">firstOfOrNull</a>. If no producer yields a value, it throws an IllegalStateException.</p><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">the first successfully produced value</p></span><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain" data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>T</span></span></u></div></span></div><div><div class="title"><p class="paragraph">the type of the produced value</p></div></div></div></div><div class="table-row" data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain" data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>deferreds</span></span></u></div></span></div><div><div class="title"><p class="paragraph">suspend producers that are started in parallel</p></div></div></div></div></div><h4 class="">Throws</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain" data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><span>Illegal</span><wbr><span>State</span><wbr><span><span>Exception</span></span></div></span></div><div><div class="title"><p class="paragraph">if none of the producers yielded a value</p></div></div></div></div><div class="table-row" data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain" data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><span>Cancellation</span><wbr><span><span>Exception</span></span></div></span></div><div><div class="title"><p class="paragraph">if the coroutine scope is cancelled or any producer throws it</p></div></div></div></div></div></div></div>
</div>
<div class="footer">
<a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>