1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-05-06 00:20:07 +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>get</span><wbr><span>With</span><wbr><span><span>Result</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.webapps:dokkaHtmlPartial/jsMain"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="-device-storage/index.html">DeviceStorage</a><span class="token punctuation">.</span><a href="get-with-result.html"><span class="token function">getWithResult</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">key<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-result/index.html">Result</a><span class="token operator">&lt;</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">?</span><span class="token operator">&gt;</span></div><p class="paragraph">Retrieves the value associated with a key. This function uses a <span data-unresolved-link="kotlinx.coroutines/CompletableDeferred///PointingToDeclaration/">CompletableDeferred</span> to handle the asynchronous callback and returns a <a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-result/index.html">Result</a> object.</p><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">A <a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-result/index.html">Result</a> object containing the result of the operation.</p></span><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.webapps:dokkaHtmlPartial/jsMain" data-filterable-set=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>key</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The key to retrieve the value for.</p></div></div></div></div></div><hr><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="-secure-storage/index.html">SecureStorage</a><span class="token punctuation">.</span><a href="get-with-result.html"><span class="token function">getWithResult</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">key<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-result/index.html">Result</a><span class="token operator">&lt;</span><span data-unresolved-link="dev.inmo.micro_utils.common/Either///PointingToDeclaration/">Either</span><span class="token operator">&lt;</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">?</span><span class="token punctuation">, </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token operator">&gt;</span><span class="token operator">&gt;</span></div><p class="paragraph">Retrieves the value associated with a key from secure storage using a <span data-unresolved-link="kotlinx.coroutines/CompletableDeferred///PointingToDeclaration/">CompletableDeferred</span> and returns a <a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-result/index.html">Result</a>. This suspending function encapsulates the asynchronous operation of retrieving a value and provides a structured way to handle both successful retrieval and potential errors. It uses a <span data-unresolved-link="kotlinx.coroutines/CompletableDeferred///PointingToDeclaration/">CompletableDeferred</span> to manage the asynchronous result.</p><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">A <a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-result/index.html">Result</a> object containing the retrieved value (which can be null if the key is not found) or a <a href="-secure-storage-error/index.html">SecureStorageError</a> representing the error that occurred.</p></span><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.webapps:dokkaHtmlPartial/jsMain" data-filterable-set=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>key</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The key to retrieve the value for.</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.webapps:dokkaHtmlPartial/jsMain"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="-device-storage/index.html">DeviceStorage</a><span class="token punctuation">.</span><a href="get-with-result.html"><span class="token function">getWithResult</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">key<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="/<Error class: unknown class>///PointingToDeclaration/">&lt;Error class: unknown class&gt;</span><span class="token operator">&lt;</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">?</span><span class="token operator">&gt;</span></div><p class="paragraph">Retrieves the value associated with a key. This function uses a <span data-unresolved-link="kotlinx.coroutines/CompletableDeferred///PointingToDeclaration/">CompletableDeferred</span> to handle the asynchronous callback and returns a Result object.</p><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">A Result object containing the result of the operation.</p></span><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.webapps:dokkaHtmlPartial/jsMain" data-filterable-set=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>key</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The key to retrieve the value for.</p></div></div></div></div></div><hr><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="-secure-storage/index.html">SecureStorage</a><span class="token punctuation">.</span><a href="get-with-result.html"><span class="token function">getWithResult</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">key<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="/<Error class: unknown class>///PointingToDeclaration/">&lt;Error class: unknown class&gt;</span><span class="token operator">&lt;</span><span data-unresolved-link="/<Error class: unknown class>///PointingToDeclaration/">&lt;Error class: unknown class&gt;</span><span class="token operator">&lt;</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">?</span><span class="token punctuation">, </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token operator">&gt;</span><span class="token operator">&gt;</span></div><p class="paragraph">Retrieves the value associated with a key from secure storage using a <span data-unresolved-link="kotlinx.coroutines/CompletableDeferred///PointingToDeclaration/">CompletableDeferred</span> and returns a Result. This suspending function encapsulates the asynchronous operation of retrieving a value and provides a structured way to handle both successful retrieval and potential errors. It uses a <span data-unresolved-link="kotlinx.coroutines/CompletableDeferred///PointingToDeclaration/">CompletableDeferred</span> to manage the asynchronous result.</p><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">A Result object containing the retrieved value (which can be null if the key is not found) or a <a href="-secure-storage-error/index.html">SecureStorageError</a> representing the error that occurred.</p></span><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.webapps:dokkaHtmlPartial/jsMain" data-filterable-set=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>key</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The key to retrieve the value for.</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>