libcosmic/type.impl/cosmic/struct.Task.js
2026-04-18 20:11:25 +00:00

9 lines
No EOL
21 KiB
JavaScript

(function() {
var type_impls = Object.fromEntries([["cosmic",[["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Debug-for-Task%3CT%3E\" class=\"impl\"><a href=\"#impl-Debug-for-Task%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"cosmic/cctk/sctk/reexports/client/backend/smallvec/alloc/fmt/trait.Debug.html\" title=\"trait cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.fmt\" class=\"method trait-impl\"><a href=\"#method.fmt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"cosmic/cctk/sctk/reexports/client/backend/smallvec/alloc/fmt/trait.Debug.html#tymethod.fmt\" class=\"fn\">fmt</a>(&amp;self, f: &amp;mut <a class=\"struct\" href=\"cosmic/cctk/sctk/reexports/client/backend/smallvec/alloc/fmt/struct.Formatter.html\" title=\"struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::fmt::Formatter\">Formatter</a>&lt;'_&gt;) -&gt; <a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.unit.html\">()</a>, <a class=\"struct\" href=\"cosmic/cctk/sctk/reexports/client/backend/smallvec/alloc/fmt/struct.Error.html\" title=\"struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::fmt::Error\">Error</a>&gt;</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href=\"cosmic/cctk/sctk/reexports/client/backend/smallvec/alloc/fmt/trait.Debug.html#tymethod.fmt\">Read more</a></div></details></div></details>","Debug","cosmic::app::Task"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Default-for-Task%3CT%3E\" class=\"impl\"><a href=\"#impl-Default-for-Task%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.default\" class=\"method trait-impl\"><a href=\"#method.default\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default\" class=\"fn\">default</a>() -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;</h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href=\"https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default\">Read more</a></div></details></div></details>","Default","cosmic::app::Task"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3C()%3E-for-Task%3CT%3E\" class=\"impl\"><a href=\"#impl-From%3C()%3E-for-Task%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.unit.html\">()</a>&gt; for <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(_value: <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.unit.html\">()</a>) -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details>","From<()>","cosmic::app::Task"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Task%3CT%3E\" class=\"impl\"><a href=\"#impl-Task%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.none\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.none\" class=\"fn\">none</a>() -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;</h4></section></summary><div class=\"docblock\"><p>Creates a <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> that does nothing.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.done\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.done\" class=\"fn\">done</a>(value: T) -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,</div></h4></section></summary><div class=\"docblock\"><p>Creates a new <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> that instantly produces the given value.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.perform\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.perform\" class=\"fn\">perform</a>&lt;A&gt;(\n future: impl <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/futures/trait.Future.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Future\">Future</a>&lt;Output = A&gt; + <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,\n f: impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(A) -&gt; T + <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,\n) -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,\n A: <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,</div></h4></section></summary><div class=\"docblock\"><p>Creates a <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> that runs the given <a href=\"cosmic/iced/daemon/program/graphics/futures/futures/trait.Future.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Future\"><code>Future</code></a> to completion and maps its\noutput with the given closure.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.run\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.run\" class=\"fn\">run</a>&lt;A&gt;(\n stream: impl <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/futures/trait.Stream.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Stream\">Stream</a>&lt;Item = A&gt; + <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,\n f: impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html\" title=\"trait core::ops::function::Fn\">Fn</a>(A) -&gt; T + <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,\n) -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;<div class=\"where\">where\n T: 'static,</div></h4></section></summary><div class=\"docblock\"><p>Creates a <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> that runs the given <a href=\"cosmic/iced/daemon/program/graphics/futures/futures/trait.Stream.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Stream\"><code>Stream</code></a> to completion and maps each\nitem with the given closure.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.batch\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.batch\" class=\"fn\">batch</a>(tasks: impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a>&lt;Item = <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;&gt;) -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;<div class=\"where\">where\n T: 'static,</div></h4></section></summary><div class=\"docblock\"><p>Combines the given tasks and produces a single <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> that will run all of them\nin parallel.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.map\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.map\" class=\"fn\">map</a>&lt;O&gt;(self, f: impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html\" title=\"trait core::ops::function::FnMut\">FnMut</a>(T) -&gt; O + <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static) -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;O&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,\n O: <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,</div></h4></section></summary><div class=\"docblock\"><p>Maps the output of a <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> with the given closure.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.then\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.then\" class=\"fn\">then</a>&lt;O&gt;(\n self,\n f: impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html\" title=\"trait core::ops::function::FnMut\">FnMut</a>(T) -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;O&gt; + <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,\n) -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;O&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,\n O: <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,</div></h4></section></summary><div class=\"docblock\"><p>Performs a new <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> for every output of the current <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> using the\ngiven closure.</p>\n<p>This is the monadic interface of <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a>—analogous to <a href=\"cosmic/iced/daemon/program/graphics/futures/futures/trait.Future.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Future\"><code>Future</code></a> and\n<a href=\"cosmic/iced/daemon/program/graphics/futures/futures/trait.Stream.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Stream\"><code>Stream</code></a>.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.chain\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.chain\" class=\"fn\">chain</a>(self, task: <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;) -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;<div class=\"where\">where\n T: 'static,</div></h4></section></summary><div class=\"docblock\"><p>Chains a new <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> to be performed once the current one finishes completely.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.collect\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.collect\" class=\"fn\">collect</a>(self) -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;<a class=\"struct\" href=\"cosmic/cctk/sctk/reexports/client/backend/smallvec/alloc/vec/struct.Vec.html\" title=\"struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::vec::Vec\">Vec</a>&lt;T&gt;&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,</div></h4></section></summary><div class=\"docblock\"><p>Creates a new <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> that collects all the output of the current one into a <a href=\"cosmic/cctk/sctk/reexports/client/backend/smallvec/alloc/vec/struct.Vec.html\" title=\"struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::vec::Vec\"><code>Vec</code></a>.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.discard\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.discard\" class=\"fn\">discard</a>&lt;O&gt;(self) -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;O&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,\n O: <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static,</div></h4></section></summary><div class=\"docblock\"><p>Creates a new <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> that discards the result of the current one.</p>\n<p>Useful if you only care about the side effects of a <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a>.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.abortable\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.abortable\" class=\"fn\">abortable</a>(self) -&gt; (<a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;, <a class=\"struct\" href=\"cosmic/iced/task/struct.Handle.html\" title=\"struct cosmic::iced::task::Handle\">Handle</a>)<div class=\"where\">where\n T: 'static,</div></h4></section></summary><div class=\"docblock\"><p>Creates a new <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> that can be aborted with the returned <a href=\"cosmic/iced/task/struct.Handle.html\" title=\"struct cosmic::iced::task::Handle\"><code>Handle</code></a>.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.future\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.future\" class=\"fn\">future</a>(future: impl <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/futures/trait.Future.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Future\">Future</a>&lt;Output = T&gt; + <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static) -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;<div class=\"where\">where\n T: 'static,</div></h4></section></summary><div class=\"docblock\"><p>Creates a new <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> that runs the given <a href=\"cosmic/iced/daemon/program/graphics/futures/futures/trait.Future.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Future\"><code>Future</code></a> and produces\nits output.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.stream\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.stream\" class=\"fn\">stream</a>(stream: impl <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/futures/trait.Stream.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Stream\">Stream</a>&lt;Item = T&gt; + <a class=\"trait\" href=\"cosmic/iced/daemon/program/graphics/futures/trait.MaybeSend.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::MaybeSend\">MaybeSend</a> + 'static) -&gt; <a class=\"struct\" href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\">Task</a>&lt;T&gt;<div class=\"where\">where\n T: 'static,</div></h4></section></summary><div class=\"docblock\"><p>Creates a new <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a> that runs the given <a href=\"cosmic/iced/daemon/program/graphics/futures/futures/trait.Stream.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Stream\"><code>Stream</code></a> and produces\neach of its items.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.units\" class=\"method\"><h4 class=\"code-header\">pub fn <a href=\"cosmic/struct.Task.html#tymethod.units\" class=\"fn\">units</a>(&amp;self) -&gt; <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a></h4></section></summary><div class=\"docblock\"><p>Returns the amount of work “units” of the <a href=\"cosmic/struct.Task.html\" title=\"struct cosmic::Task\"><code>Task</code></a>.</p>\n</div></details></div></details>",0,"cosmic::app::Task"]]]]);
if (window.register_type_impls) {
window.register_type_impls(type_impls);
} else {
window.pending_type_impls = type_impls;
}
})()
//{"start":55,"fragment_lengths":[20803]}