Files
google-apis-rs/futures/task/index.html
2024-03-05 21:06:01 +01:00

23 lines
11 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Tools for working with tasks."><title>futures::task - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="futures" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../futures/index.html">futures</a><span class="version">0.3.28</span></h2></div><h2 class="location"><a href="#">Module task</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></section><h2><a href="../index.html">In crate futures</a></h2></div></nav><div class="sidebar-resizer"></div>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../futures/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">futures</a>::<wbr><a class="mod" href="#">task</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/futures_util/lib.rs.html#309">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Tools for working with tasks.</p>
<p>This module contains:</p>
<ul>
<li><a href="trait.Spawn.html" title="trait futures::task::Spawn"><code>Spawn</code></a>, a trait for spawning new tasks.</li>
<li><a href="struct.Context.html" title="struct futures::task::Context"><code>Context</code></a>, a context of an asynchronous task,
including a handle for waking up the task.</li>
<li><a href="struct.Waker.html" title="struct futures::task::Waker"><code>Waker</code></a>, a handle for waking up a task.</li>
</ul>
<p>The remaining types and traits in the module are used for implementing
executors or dealing with synchronization issues around task wakeup.</p>
</div></details><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.AtomicWaker.html" title="struct futures::task::AtomicWaker">AtomicWaker</a></div><div class="desc docblock-short">A synchronization primitive for task wakeup.</div></li><li><div class="item-name"><a class="struct" href="struct.Context.html" title="struct futures::task::Context">Context</a></div><div class="desc docblock-short">The context of an asynchronous task.</div></li><li><div class="item-name"><a class="struct" href="struct.FutureObj.html" title="struct futures::task::FutureObj">FutureObj</a></div><div class="desc docblock-short">A custom trait object for polling futures, roughly akin to
<code>Box&lt;dyn Future&lt;Output = T&gt; + Send + 'a&gt;</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.LocalFutureObj.html" title="struct futures::task::LocalFutureObj">LocalFutureObj</a></div><div class="desc docblock-short">A custom trait object for polling futures, roughly akin to
<code>Box&lt;dyn Future&lt;Output = T&gt; + 'a&gt;</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.RawWaker.html" title="struct futures::task::RawWaker">RawWaker</a></div><div class="desc docblock-short">A <code>RawWaker</code> allows the implementor of a task executor to create a <a href="struct.Waker.html" title="struct futures::task::Waker"><code>Waker</code></a>
which provides customized wakeup behavior.</div></li><li><div class="item-name"><a class="struct" href="struct.RawWakerVTable.html" title="struct futures::task::RawWakerVTable">RawWakerVTable</a></div><div class="desc docblock-short">A virtual function pointer table (vtable) that specifies the behavior
of a <a href="struct.RawWaker.html" title="struct futures::task::RawWaker"><code>RawWaker</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.SpawnError.html" title="struct futures::task::SpawnError">SpawnError</a></div><div class="desc docblock-short">An error that occurred during spawning.</div></li><li><div class="item-name"><a class="struct" href="struct.Waker.html" title="struct futures::task::Waker">Waker</a></div><div class="desc docblock-short">A <code>Waker</code> is a handle for waking up a task by notifying its executor that it
is ready to be run.</div></li><li><div class="item-name"><a class="struct" href="struct.WakerRef.html" title="struct futures::task::WakerRef">WakerRef</a></div><div class="desc docblock-short">A <a href="struct.Waker.html" title="struct futures::task::Waker"><code>Waker</code></a> that is only valid for a given lifetime.</div></li></ul><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Poll.html" title="enum futures::task::Poll">Poll</a></div><div class="desc docblock-short">Indicates whether a value is available or if the current task has been
scheduled to receive a wakeup instead.</div></li></ul><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.ArcWake.html" title="trait futures::task::ArcWake">ArcWake</a></div><div class="desc docblock-short">A way of waking up a specific task.</div></li><li><div class="item-name"><a class="trait" href="trait.LocalSpawn.html" title="trait futures::task::LocalSpawn">LocalSpawn</a></div><div class="desc docblock-short">The <code>LocalSpawn</code> is similar to <a href="trait.Spawn.html" title="trait futures::task::Spawn"><code>Spawn</code></a>, but allows spawning futures
that dont implement <code>Send</code>.</div></li><li><div class="item-name"><a class="trait" href="trait.LocalSpawnExt.html" title="trait futures::task::LocalSpawnExt">LocalSpawnExt</a></div><div class="desc docblock-short">Extension trait for <code>LocalSpawn</code>.</div></li><li><div class="item-name"><a class="trait" href="trait.Spawn.html" title="trait futures::task::Spawn">Spawn</a></div><div class="desc docblock-short">The <code>Spawn</code> trait allows for pushing futures onto an executor that will
run them to completion.</div></li><li><div class="item-name"><a class="trait" href="trait.SpawnExt.html" title="trait futures::task::SpawnExt">SpawnExt</a></div><div class="desc docblock-short">Extension trait for <code>Spawn</code>.</div></li><li><div class="item-name"><a class="trait" href="trait.UnsafeFutureObj.html" title="trait futures::task::UnsafeFutureObj">UnsafeFutureObj</a></div><div class="desc docblock-short">A custom implementation of a future trait object for <code>FutureObj</code>, providing
a vtable with drop support.</div></li></ul><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.noop_waker.html" title="fn futures::task::noop_waker">noop_waker</a></div><div class="desc docblock-short">Create a new <a href="struct.Waker.html" title="struct futures::task::Waker"><code>Waker</code></a> which does
nothing when <code>wake()</code> is called on it.</div></li><li><div class="item-name"><a class="fn" href="fn.noop_waker_ref.html" title="fn futures::task::noop_waker_ref">noop_waker_ref</a></div><div class="desc docblock-short">Get a static reference to a <a href="struct.Waker.html" title="struct futures::task::Waker"><code>Waker</code></a> which
does nothing when <code>wake()</code> is called on it.</div></li><li><div class="item-name"><a class="fn" href="fn.waker.html" title="fn futures::task::waker">waker</a></div><div class="desc docblock-short">Creates a <a href="struct.Waker.html" title="struct futures::task::Waker"><code>Waker</code></a> from an <code>Arc&lt;impl ArcWake&gt;</code>.</div></li><li><div class="item-name"><a class="fn" href="fn.waker_ref.html" title="fn futures::task::waker_ref">waker_ref</a></div><div class="desc docblock-short">Creates a reference to a <a href="struct.Waker.html" title="struct futures::task::Waker"><code>Waker</code></a> from a reference to <code>Arc&lt;impl ArcWake&gt;</code>.</div></li></ul></section></div></main></body></html>