deploy: 95756b1a57
This commit is contained in:
commit
0fa87f2b35
16382 changed files with 734838 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
<!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="A default, cross-platform backend."><title>cosmic::iced::daemon::program::graphics::futures::backend::default - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module default</a></h2><h3><a href="#types">Module Items</a></h3><ul class="block"><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>backend</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">backend</a></div><h1>Module <span>default</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A default, cross-platform backend.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>On native platforms, it will use:</p>
|
||||
<ul>
|
||||
<li><code>backend::native::tokio</code> when the <code>tokio</code> feature is enabled.</li>
|
||||
<li><code>backend::native::smol</code> when the <code>smol</code> feature is enabled.</li>
|
||||
<li><code>backend::native::thread_pool</code> when the <code>thread-pool</code> feature is enabled.</li>
|
||||
<li><code>backend::null</code> otherwise.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>On Wasm, it will use <code>backend::wasm::wasm_bindgen</code>.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div></details><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.Executor.html" title="type cosmic::iced::daemon::program::graphics::futures::backend::default::Executor">Executor</a></dt><dd>A <code>tokio</code> executor.</dd></dl></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"type":["Executor"]};
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<!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="A `tokio` executor."><title>Executor in cosmic::iced::daemon::program::graphics::futures::backend::default - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Executor</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>backend::<wbr>default</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">backend</a>::<wbr><a href="index.html">default</a></div><h1>Type Alias <span class="type">Executor</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub type Executor = Runtime;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>tokio</code> executor.</p>
|
||||
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct Executor { <span class="comment">/* private fields */</span> }</code></pre><script src="../../../../../../../../type.impl/tokio/runtime/runtime/struct.Runtime.js" data-self-path="cosmic::iced::executor::Default" async></script></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<!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="The underlying implementations of the `iced_futures` contract!"><title>cosmic::iced::daemon::program::graphics::futures::backend - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../" data-static-root-path="../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module backend</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../index.html">iced</a>::<wbr><a href="../../../../index.html">daemon</a>::<wbr><a href="../../../index.html">program</a>::<wbr><a href="../../index.html">graphics</a>::<wbr><a href="../index.html">futures</a></div><h1>Module <span>backend</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The underlying implementations of the <code>iced_futures</code> contract!</p>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="default/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::backend::default">default</a></dt><dd>A default, cross-platform backend.</dd><dt><a class="mod" href="native/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::backend::native">native</a></dt><dd>Backends that are only available in native platforms: Windows, macOS, or Linux.</dd><dt><a class="mod" href="null/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::backend::null">null</a></dt><dd>A backend that does nothing!</dd></dl></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<!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="Backends that are only available in native platforms: Windows, macOS, or Linux."><title>cosmic::iced::daemon::program::graphics::futures::backend::native - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module native</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>backend</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">backend</a></div><h1>Module <span>native</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Backends that are only available in native platforms: Windows, macOS, or Linux.</p>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="thread_pool/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::backend::native::thread_pool">thread_<wbr>pool</a></dt><dd>A <code>ThreadPool</code> backend.</dd><dt><a class="mod" href="tokio/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::backend::native::tokio">tokio</a></dt><dd>A <code>tokio</code> backend.</dd></dl></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"mod":["thread_pool","tokio"]};
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<!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="A `ThreadPool` backend."><title>cosmic::iced::daemon::program::graphics::futures::backend::native::thread_pool - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../" data-static-root-path="../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module thread_<wbr>pool</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>backend::<wbr>native</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../index.html">program</a>::<wbr><a href="../../../../index.html">graphics</a>::<wbr><a href="../../../index.html">futures</a>::<wbr><a href="../../index.html">backend</a>::<wbr><a href="../index.html">native</a></div><h1>Module <span>thread_pool</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>ThreadPool</code> backend.</p>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="time/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::backend::native::thread_pool::time">time</a></dt><dd>Listen and react to time.</dd></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.Executor.html" title="type cosmic::iced::daemon::program::graphics::futures::backend::native::thread_pool::Executor">Executor</a></dt><dd>A thread pool executor for futures.</dd></dl></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"mod":["time"],"type":["Executor"]};
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<!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="Listen and react to time."><title>cosmic::iced::daemon::program::graphics::futures::backend::native::thread_pool::time - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../../" data-static-root-path="../../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>backend::<wbr>native::<wbr>thread_<wbr>pool</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../../index.html">program</a>::<wbr><a href="../../../../../index.html">graphics</a>::<wbr><a href="../../../../index.html">futures</a>::<wbr><a href="../../../index.html">backend</a>::<wbr><a href="../../index.html">native</a>::<wbr><a href="../index.html">thread_pool</a></div><h1>Module <span>time</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Listen and react to time.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {};
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<!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="A thread pool executor for futures."><title>Executor in cosmic::iced::daemon::program::graphics::futures::backend::native::thread_pool - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../" data-static-root-path="../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Executor</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>backend::<wbr>native::<wbr>thread_<wbr>pool</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../index.html">program</a>::<wbr><a href="../../../../index.html">graphics</a>::<wbr><a href="../../../index.html">futures</a>::<wbr><a href="../../index.html">backend</a>::<wbr><a href="../index.html">native</a>::<wbr><a href="index.html">thread_pool</a></div><h1>Type Alias <span class="type">Executor</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub type Executor = <a class="struct" href="../../../futures/executor/struct.ThreadPool.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::ThreadPool">ThreadPool</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A thread pool executor for futures.</p>
|
||||
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct Executor { <span class="comment">/* private fields */</span> }</code></pre><script src="../../../../../../../../../type.impl/cosmic/iced/daemon/program/graphics/futures/futures/executor/struct.ThreadPool.js" data-self-path="cosmic::iced::daemon::program::graphics::futures::backend::native::thread_pool::Executor" async></script></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<!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="A `tokio` backend."><title>cosmic::iced::daemon::program::graphics::futures::backend::native::tokio - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../" data-static-root-path="../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module tokio</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>backend::<wbr>native</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../index.html">program</a>::<wbr><a href="../../../../index.html">graphics</a>::<wbr><a href="../../../index.html">futures</a>::<wbr><a href="../../index.html">backend</a>::<wbr><a href="../index.html">native</a></div><h1>Module <span>tokio</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>tokio</code> backend.</p>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="time/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::backend::native::tokio::time">time</a></dt><dd>Listen and react to time.</dd></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.Executor.html" title="type cosmic::iced::daemon::program::graphics::futures::backend::native::tokio::Executor">Executor</a></dt><dd>A <code>tokio</code> executor.</dd></dl></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"mod":["time"],"type":["Executor"]};
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<!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="Returns a `Subscription` that produces messages at a set interval."><title>every in cosmic::iced::daemon::program::graphics::futures::backend::native::tokio::time - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../../" data-static-root-path="../../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>backend::<wbr>native::<wbr>tokio::<wbr>time</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../../index.html">program</a>::<wbr><a href="../../../../../index.html">graphics</a>::<wbr><a href="../../../../index.html">futures</a>::<wbr><a href="../../../index.html">backend</a>::<wbr><a href="../../index.html">native</a>::<wbr><a href="../index.html">tokio</a>::<wbr><a href="index.html">time</a></div><h1>Function <span class="fn">every</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn every(duration: <a class="struct" href="../../../../../../../../time/struct.Duration.html" title="struct cosmic::iced::time::Duration">Duration</a>) -> <a class="struct" href="../../../../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription">Subscription</a><<a class="struct" href="../../../../../../../../time/struct.Instant.html" title="struct cosmic::iced::time::Instant">Instant</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Returns a <a href="../../../../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription"><code>Subscription</code></a> that produces messages at a set interval.</p>
|
||||
<p>The first message is produced after a <code>duration</code>, and then continues to
|
||||
produce more messages every <code>duration</code> after that.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<!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="Returns a `Subscription` that runs the given async function at a set interval; producing the result of the function as output."><title>repeat in cosmic::iced::daemon::program::graphics::futures::backend::native::tokio::time - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../../" data-static-root-path="../../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>backend::<wbr>native::<wbr>tokio::<wbr>time</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../../index.html">program</a>::<wbr><a href="../../../../../index.html">graphics</a>::<wbr><a href="../../../../index.html">futures</a>::<wbr><a href="../../../index.html">backend</a>::<wbr><a href="../../index.html">native</a>::<wbr><a href="../index.html">tokio</a>::<wbr><a href="index.html">time</a></div><h1>Function <span class="fn">repeat</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn repeat<F, T>(f: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.fn.html">fn</a>() -> F, interval: <a class="struct" href="../../../../../../../../time/struct.Duration.html" title="struct cosmic::iced::time::Duration">Duration</a>) -> <a class="struct" href="../../../../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription">Subscription</a><T><div class="where">where
|
||||
F: <a class="trait" href="../../../../futures/trait.Future.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::Future">Future</a><Output = T> + <a class="trait" href="../../../../trait.MaybeSend.html" title="trait cosmic::iced::daemon::program::graphics::futures::MaybeSend">MaybeSend</a> + 'static,
|
||||
T: <a class="trait" href="../../../../trait.MaybeSend.html" title="trait cosmic::iced::daemon::program::graphics::futures::MaybeSend">MaybeSend</a> + 'static,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Returns a <a href="../../../../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription"><code>Subscription</code></a> that runs the given async function at a
|
||||
set interval; producing the result of the function as output.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<!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="Listen and react to time."><title>cosmic::iced::daemon::program::graphics::futures::backend::native::tokio::time - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../../" data-static-root-path="../../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module time</a></h2><h3><a href="#functions">Module Items</a></h3><ul class="block"><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>backend::<wbr>native::<wbr>tokio</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../../index.html">program</a>::<wbr><a href="../../../../../index.html">graphics</a>::<wbr><a href="../../../../index.html">futures</a>::<wbr><a href="../../../index.html">backend</a>::<wbr><a href="../../index.html">native</a>::<wbr><a href="../index.html">tokio</a></div><h1>Module <span>time</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Listen and react to time.</p>
|
||||
</div></details><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.every.html" title="fn cosmic::iced::daemon::program::graphics::futures::backend::native::tokio::time::every">every</a></dt><dd>Returns a <a href="../../../../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription"><code>Subscription</code></a> that produces messages at a set interval.</dd><dt><a class="fn" href="fn.repeat.html" title="fn cosmic::iced::daemon::program::graphics::futures::backend::native::tokio::time::repeat">repeat</a></dt><dd>Returns a <a href="../../../../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription"><code>Subscription</code></a> that runs the given async function at a
|
||||
set interval; producing the result of the function as output.</dd></dl></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"fn":["every","repeat"]};
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<!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="A `tokio` executor."><title>Executor in cosmic::iced::daemon::program::graphics::futures::backend::native::tokio - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../" data-static-root-path="../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Executor</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>backend::<wbr>native::<wbr>tokio</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../index.html">program</a>::<wbr><a href="../../../../index.html">graphics</a>::<wbr><a href="../../../index.html">futures</a>::<wbr><a href="../../index.html">backend</a>::<wbr><a href="../index.html">native</a>::<wbr><a href="index.html">tokio</a></div><h1>Type Alias <span class="type">Executor</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub type Executor = Runtime;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>tokio</code> executor.</p>
|
||||
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct Executor { <span class="comment">/* private fields */</span> }</code></pre><script src="../../../../../../../../../type.impl/tokio/runtime/runtime/struct.Runtime.js" data-self-path="cosmic::iced::executor::Default" async></script></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<!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="A backend that does nothing!"><title>cosmic::iced::daemon::program::graphics::futures::backend::null - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module null</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>backend</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">backend</a></div><h1>Module <span>null</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A backend that does nothing!</p>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="time/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::backend::null::time">time</a></dt><dd>Listen and react to time.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Executor.html" title="struct cosmic::iced::daemon::program::graphics::futures::backend::null::Executor">Executor</a></dt><dd>An executor that drops all the futures, instead of spawning them.</dd></dl></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"mod":["time"],"struct":["Executor"]};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,2 @@
|
|||
<!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="Listen and react to time."><title>cosmic::iced::daemon::program::graphics::futures::backend::null::time - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../" data-static-root-path="../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>backend::<wbr>null</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../index.html">program</a>::<wbr><a href="../../../../index.html">graphics</a>::<wbr><a href="../../../index.html">futures</a>::<wbr><a href="../../index.html">backend</a>::<wbr><a href="../index.html">null</a></div><h1>Module <span>time</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Listen and react to time.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {};
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"mod":["default","native","null"]};
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<!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="Returns a `Subscription` to all the ignored runtime events."><title>listen in cosmic::iced::daemon::program::graphics::futures::event - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../" data-static-root-path="../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>event</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../index.html">iced</a>::<wbr><a href="../../../../index.html">daemon</a>::<wbr><a href="../../../index.html">program</a>::<wbr><a href="../../index.html">graphics</a>::<wbr><a href="../index.html">futures</a>::<wbr><a href="index.html">event</a></div><h1>Function <span class="fn">listen</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn listen() -> <a class="struct" href="../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription">Subscription</a><<a class="enum" href="../../../../../enum.Event.html" title="enum cosmic::iced::Event">Event</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Returns a <a href="../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription"><code>Subscription</code></a> to all the ignored runtime events.</p>
|
||||
<p>This subscription will notify your application of any <a href="../../../../../enum.Event.html" title="enum cosmic::iced::Event"><code>Event</code></a> that was
|
||||
not captured by any widget.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<!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="Creates a `Subscription` that produces a message for every runtime event, including the redraw request events."><title>listen_raw in cosmic::iced::daemon::program::graphics::futures::event - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../" data-static-root-path="../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>event</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../index.html">iced</a>::<wbr><a href="../../../../index.html">daemon</a>::<wbr><a href="../../../index.html">program</a>::<wbr><a href="../../index.html">graphics</a>::<wbr><a href="../index.html">futures</a>::<wbr><a href="index.html">event</a></div><h1>Function <span class="fn">listen_raw</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn listen_raw<Message>(
|
||||
f: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.fn.html">fn</a>(<a class="enum" href="../../../../../enum.Event.html" title="enum cosmic::iced::Event">Event</a>, <a class="enum" href="../../../../../event/enum.Status.html" title="enum cosmic::iced::event::Status">Status</a>, <a class="struct" href="../../../../../window/struct.Id.html" title="struct cosmic::iced::window::Id">Id</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Message>,
|
||||
) -> <a class="struct" href="../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription">Subscription</a><Message><div class="where">where
|
||||
Message: 'static + <a class="trait" href="../trait.MaybeSend.html" title="trait cosmic::iced::daemon::program::graphics::futures::MaybeSend">MaybeSend</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a <a href="../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription"><code>Subscription</code></a> that produces a message for every runtime event,
|
||||
including the redraw request events.</p>
|
||||
<p><strong>Warning:</strong> This <a href="../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription"><code>Subscription</code></a>, if unfiltered, may produce messages in
|
||||
an infinite loop.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<!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="Creates a `Subscription` that listens and filters all the runtime events with the provided function, producing messages accordingly."><title>listen_with in cosmic::iced::daemon::program::graphics::futures::event - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../" data-static-root-path="../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>event</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../index.html">iced</a>::<wbr><a href="../../../../index.html">daemon</a>::<wbr><a href="../../../index.html">program</a>::<wbr><a href="../../index.html">graphics</a>::<wbr><a href="../index.html">futures</a>::<wbr><a href="index.html">event</a></div><h1>Function <span class="fn">listen_with</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn listen_with<Message>(
|
||||
f: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.fn.html">fn</a>(<a class="enum" href="../../../../../enum.Event.html" title="enum cosmic::iced::Event">Event</a>, <a class="enum" href="../../../../../event/enum.Status.html" title="enum cosmic::iced::event::Status">Status</a>, <a class="struct" href="../../../../../window/struct.Id.html" title="struct cosmic::iced::window::Id">Id</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Message>,
|
||||
) -> <a class="struct" href="../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription">Subscription</a><Message><div class="where">where
|
||||
Message: 'static + <a class="trait" href="../trait.MaybeSend.html" title="trait cosmic::iced::daemon::program::graphics::futures::MaybeSend">MaybeSend</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a <a href="../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription"><code>Subscription</code></a> that listens and filters all the runtime events
|
||||
with the provided function, producing messages accordingly.</p>
|
||||
<p>This subscription will call the provided function for every <a href="../../../../../enum.Event.html" title="enum cosmic::iced::Event"><code>Event</code></a>
|
||||
handled by the runtime. If the function:</p>
|
||||
<ul>
|
||||
<li>Returns <code>None</code>, the <a href="../../../../../enum.Event.html" title="enum cosmic::iced::Event"><code>Event</code></a> will be discarded.</li>
|
||||
<li>Returns <code>Some</code> message, the <code>Message</code> will be produced.</li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<!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="Listen to runtime events."><title>cosmic::iced::daemon::program::graphics::futures::event - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../" data-static-root-path="../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module event</a></h2><h3><a href="#functions">Module Items</a></h3><ul class="block"><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../index.html">iced</a>::<wbr><a href="../../../../index.html">daemon</a>::<wbr><a href="../../../index.html">program</a>::<wbr><a href="../../index.html">graphics</a>::<wbr><a href="../index.html">futures</a></div><h1>Module <span>event</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Listen to runtime events.</p>
|
||||
</div></details><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.listen.html" title="fn cosmic::iced::daemon::program::graphics::futures::event::listen">listen</a></dt><dd>Returns a <a href="../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription"><code>Subscription</code></a> to all the ignored runtime events.</dd><dt><a class="fn" href="fn.listen_raw.html" title="fn cosmic::iced::daemon::program::graphics::futures::event::listen_raw">listen_<wbr>raw</a></dt><dd>Creates a <a href="../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription"><code>Subscription</code></a> that produces a message for every runtime event,
|
||||
including the redraw request events.</dd><dt><a class="fn" href="fn.listen_with.html" title="fn cosmic::iced::daemon::program::graphics::futures::event::listen_with">listen_<wbr>with</a></dt><dd>Creates a <a href="../../../../../struct.Subscription.html" title="struct cosmic::iced::Subscription"><code>Subscription</code></a> that listens and filters all the runtime events
|
||||
with the provided function, producing messages accordingly.</dd></dl></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"fn":["listen","listen_raw","listen_with"]};
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<!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="Choose your preferred executor to power a runtime."><title>cosmic::iced::daemon::program::graphics::futures::executor - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../" data-static-root-path="../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module executor</a></h2><h3><a href="#traits">Module Items</a></h3><ul class="block"><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../index.html">iced</a>::<wbr><a href="../../../../index.html">daemon</a>::<wbr><a href="../../../index.html">program</a>::<wbr><a href="../../index.html">graphics</a>::<wbr><a href="../index.html">futures</a></div><h1>Module <span>executor</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Choose your preferred executor to power a runtime.</p>
|
||||
</div></details><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.Executor.html" title="trait cosmic::iced::daemon::program::graphics::futures::executor::Executor">Executor</a></dt><dd>A type that can run futures.</dd></dl></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"trait":["Executor"]};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,7 @@
|
|||
<!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="Boxes a stream."><title>boxed_stream in cosmic::iced::daemon::program::graphics::futures - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../" data-static-root-path="../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../index.html">cosmic</a>::<wbr><a href="../../../../index.html">iced</a>::<wbr><a href="../../../index.html">daemon</a>::<wbr><a href="../../index.html">program</a>::<wbr><a href="../index.html">graphics</a>::<wbr><a href="index.html">futures</a></div><h1>Function <span class="fn">boxed_stream</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn boxed_stream<T, S>(stream: S) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="../../../../../cctk/sctk/reexports/client/backend/smallvec/alloc/boxed/struct.Box.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::boxed::Box">Box</a><dyn <a class="trait" href="futures/trait.Stream.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::Stream">Stream</a><Item = T> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>>><div class="where">where
|
||||
S: <a class="trait" href="futures/trait.Stream.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::Stream">Stream</a><Item = T> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Boxes a stream.</p>
|
||||
<ul>
|
||||
<li>On native platforms, it needs a <code>Send</code> requirement.</li>
|
||||
<li>On the Web platform, it does not need a <code>Send</code> requirement.</li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<!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="Asynchronous channels."><title>cosmic::iced::daemon::program::graphics::futures::futures::channel - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../../../../../../../../crates.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#modules">Crate Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">futures</a></div><h1>Crate <span>channel</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Asynchronous channels.</p>
|
||||
<p>Like threads, concurrent tasks sometimes need to communicate with each
|
||||
other. This module contains two basic abstractions for doing so:</p>
|
||||
<ul>
|
||||
<li><a href="oneshot/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::channel::oneshot">oneshot</a>, a way of sending a single value from one task to another.</li>
|
||||
<li><a href="mpsc/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc">mpsc</a>, a multi-producer, single-consumer channel for sending values
|
||||
between tasks, analogous to the similarly-named structure in the standard
|
||||
library.</li>
|
||||
</ul>
|
||||
<p>All items are only available when the <code>std</code> or <code>alloc</code> feature of this
|
||||
library is activated, and it is activated by default.</p>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="mpsc/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc">mpsc</a></dt><dd>A multi-producer, single-consumer queue for sending values across
|
||||
asynchronous tasks.</dd><dt><a class="mod" href="oneshot/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::channel::oneshot">oneshot</a></dt><dd>A channel for sending a single message between asynchronous tasks.</dd></dl></section></div></main></body></html>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,9 @@
|
|||
<!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="Creates a bounded mpsc channel for communicating between asynchronous tasks."><title>channel in cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../" data-static-root-path="../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>channel::<wbr>mpsc</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../index.html">program</a>::<wbr><a href="../../../../index.html">graphics</a>::<wbr><a href="../../../index.html">futures</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">channel</a>::<wbr><a href="index.html">mpsc</a></div><h1>Function <span class="fn">channel</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn channel<T>(buffer: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> (<a class="struct" href="struct.Sender.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::Sender">Sender</a><T>, <a class="struct" href="struct.Receiver.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::Receiver">Receiver</a><T>)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a bounded mpsc channel for communicating between asynchronous tasks.</p>
|
||||
<p>Being bounded, this channel provides backpressure to ensure that the sender
|
||||
outpaces the receiver by only a limited amount. The channel’s capacity is
|
||||
equal to <code>buffer + num-senders</code>. In other words, each sender gets a
|
||||
guaranteed slot in the channel capacity, and on top of that there are
|
||||
<code>buffer</code> “first come, first serve” slots available to all senders.</p>
|
||||
<p>The <a href="struct.Receiver.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::Receiver"><code>Receiver</code></a> returned implements the <a href="../../trait.Stream.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::Stream"><code>Stream</code></a> trait, while <a href="struct.Sender.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::Sender"><code>Sender</code></a>
|
||||
implements <code>Sink</code>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<!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="Creates an unbounded mpsc channel for communicating between asynchronous tasks."><title>unbounded in cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../" data-static-root-path="../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>channel::<wbr>mpsc</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../index.html">program</a>::<wbr><a href="../../../../index.html">graphics</a>::<wbr><a href="../../../index.html">futures</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">channel</a>::<wbr><a href="index.html">mpsc</a></div><h1>Function <span class="fn">unbounded</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn unbounded<T>() -> (<a class="struct" href="struct.UnboundedSender.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::UnboundedSender">UnboundedSender</a><T>, <a class="struct" href="struct.UnboundedReceiver.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::UnboundedReceiver">UnboundedReceiver</a><T>)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates an unbounded mpsc channel for communicating between asynchronous
|
||||
tasks.</p>
|
||||
<p>A <code>send</code> on this channel will always succeed as long as the receive half has
|
||||
not been closed. If the receiver falls behind, messages will be arbitrarily
|
||||
buffered.</p>
|
||||
<p><strong>Note</strong> that the amount of available system memory is an implicit bound to
|
||||
the channel. Using an <code>unbounded</code> channel has the ability of causing the
|
||||
process to run out of memory. In this case, the process will be aborted.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<!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="A multi-producer, single-consumer queue for sending values across asynchronous tasks."><title>cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../" data-static-root-path="../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module mpsc</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#disconnection" title="Disconnection">Disconnection</a></li><li><a href="#clean-shutdown" title="Clean Shutdown">Clean Shutdown</a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>channel</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../index.html">program</a>::<wbr><a href="../../../../index.html">graphics</a>::<wbr><a href="../../../index.html">futures</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">channel</a></div><h1>Module <span>mpsc</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A multi-producer, single-consumer queue for sending values across
|
||||
asynchronous tasks.</p>
|
||||
<p>Similarly to the <code>std</code>, channel creation provides <a href="struct.Receiver.html"><code>Receiver</code></a> and
|
||||
<a href="struct.Sender.html"><code>Sender</code></a> handles. <a href="struct.Receiver.html"><code>Receiver</code></a> implements <a href="../../futures_core/stream/trait.Stream.html"><code>Stream</code></a> and allows a task to
|
||||
read values out of the channel. If there is no message to read from the
|
||||
channel, the current task will be notified when a new value is sent.
|
||||
<a href="struct.Sender.html"><code>Sender</code></a> implements the <code>Sink</code> trait and allows a task to send messages into
|
||||
the channel. If the channel is at capacity, the send will be rejected and
|
||||
the task will be notified when additional capacity is available. In other
|
||||
words, the channel provides backpressure.</p>
|
||||
<p>Unbounded channels are also available using the <code>unbounded</code> constructor.</p>
|
||||
<h2 id="disconnection"><a class="doc-anchor" href="#disconnection">§</a>Disconnection</h2>
|
||||
<p>When all <a href="struct.Sender.html"><code>Sender</code></a> handles have been dropped, it is no longer
|
||||
possible to send values into the channel. This is considered the termination
|
||||
event of the stream. As such, <a href="../../futures_core/stream/trait.Stream.html#tymethod.poll_next"><code>Receiver::poll_next</code></a>
|
||||
will return <code>Ok(Ready(None))</code>.</p>
|
||||
<p>If the <a href="struct.Receiver.html"><code>Receiver</code></a> handle is dropped, then messages can no longer
|
||||
be read out of the channel. In this case, all further attempts to send will
|
||||
result in an error.</p>
|
||||
<h2 id="clean-shutdown"><a class="doc-anchor" href="#clean-shutdown">§</a>Clean Shutdown</h2>
|
||||
<p>If the <a href="struct.Receiver.html"><code>Receiver</code></a> is simply dropped, then it is possible for
|
||||
there to be messages still in the channel that will not be processed. As
|
||||
such, it is usually desirable to perform a “clean” shutdown. To do this, the
|
||||
receiver will first call <code>close</code>, which will prevent any further messages to
|
||||
be sent into the channel. Then, the receiver consumes the channel to
|
||||
completion, at which point the receiver can be dropped.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Receiver.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::Receiver">Receiver</a></dt><dd>The receiving end of a bounded mpsc channel.</dd><dt><a class="struct" href="struct.Recv.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::Recv">Recv</a></dt><dd>Future returned by <a href="struct.Receiver.html#method.recv" title="method cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::Receiver::recv"><code>Receiver::recv()</code></a> or <a href="struct.UnboundedReceiver.html#method.recv" title="method cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::UnboundedReceiver::recv"><code>UnboundedReceiver::recv()</code></a>.</dd><dt><a class="struct" href="struct.RecvError.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::RecvError">Recv<wbr>Error</a></dt><dd>Error returned by the future returned by <a href="struct.Receiver.html#method.recv" title="method cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::Receiver::recv"><code>Receiver::recv()</code></a> or <a href="struct.UnboundedReceiver.html#method.recv" title="method cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::UnboundedReceiver::recv"><code>UnboundedReceiver::recv()</code></a>.
|
||||
Received when the channel is empty and closed.</dd><dt><a class="struct" href="struct.SendError.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::SendError">Send<wbr>Error</a></dt><dd>The error type for <a href="struct.Sender.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::Sender"><code>Sender</code>s</a> used as <code>Sink</code>s.</dd><dt><a class="struct" href="struct.Sender.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::Sender">Sender</a></dt><dd>The transmission end of a bounded mpsc channel.</dd><dt><a class="struct" href="struct.TrySendError.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::TrySendError">TrySend<wbr>Error</a></dt><dd>The error type returned from <a href="struct.Sender.html#method.try_send" title="method cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::Sender::try_send"><code>try_send</code></a>.</dd><dt><a class="struct" href="struct.UnboundedReceiver.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::UnboundedReceiver">Unbounded<wbr>Receiver</a></dt><dd>The receiving end of an unbounded mpsc channel.</dd><dt><a class="struct" href="struct.UnboundedSender.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::UnboundedSender">Unbounded<wbr>Sender</a></dt><dd>The transmission end of an unbounded mpsc channel.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.TryRecvError.html" title="enum cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::TryRecvError">TryRecv<wbr>Error</a></dt><dd>Error returned by <a href="struct.Receiver.html#method.try_recv" title="method cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::Receiver::try_recv"><code>Receiver::try_recv</code></a> or <a href="struct.UnboundedReceiver.html#method.try_recv" title="method cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::UnboundedReceiver::try_recv"><code>UnboundedReceiver::try_recv</code></a>.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.channel.html" title="fn cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::channel">channel</a></dt><dd>Creates a bounded mpsc channel for communicating between asynchronous tasks.</dd><dt><a class="fn" href="fn.unbounded.html" title="fn cosmic::iced::daemon::program::graphics::futures::futures::channel::mpsc::unbounded">unbounded</a></dt><dd>Creates an unbounded mpsc channel for communicating between asynchronous
|
||||
tasks.</dd></dl></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"enum":["TryRecvError"],"fn":["channel","unbounded"],"struct":["Receiver","Recv","RecvError","SendError","Sender","TrySendError","UnboundedReceiver","UnboundedSender"]};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,28 @@
|
|||
<!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="Creates a new one-shot channel for sending a single value across asynchronous tasks."><title>channel in cosmic::iced::daemon::program::graphics::futures::futures::channel::oneshot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../" data-static-root-path="../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">channel</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>channel::<wbr>oneshot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../index.html">program</a>::<wbr><a href="../../../../index.html">graphics</a>::<wbr><a href="../../../index.html">futures</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">channel</a>::<wbr><a href="index.html">oneshot</a></div><h1>Function <span class="fn">channel</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn channel<T>() -> (<a class="struct" href="struct.Sender.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::oneshot::Sender">Sender</a><T>, <a class="struct" href="struct.Receiver.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::oneshot::Receiver">Receiver</a><T>)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new one-shot channel for sending a single value across asynchronous tasks.</p>
|
||||
<p>The channel works for a spsc (single-producer, single-consumer) scheme.</p>
|
||||
<p>This function is similar to Rust’s channel constructor found in the standard
|
||||
library. Two halves are returned, the first of which is a <code>Sender</code> handle,
|
||||
used to signal the end of a computation and provide its value. The second
|
||||
half is a <code>Receiver</code> which implements the <code>Future</code> trait, resolving to the
|
||||
value that was given to the <code>Sender</code> handle.</p>
|
||||
<p>Each half can be separately owned and sent across tasks.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>futures::channel::oneshot;
|
||||
<span class="kw">use </span>std::{thread, time::Duration};
|
||||
|
||||
<span class="kw">let </span>(sender, receiver) = oneshot::channel::<i32>();
|
||||
|
||||
thread::spawn(|| {
|
||||
<span class="macro">println!</span>(<span class="string">"THREAD: sleeping zzz..."</span>);
|
||||
thread::sleep(Duration::from_millis(<span class="number">1000</span>));
|
||||
<span class="macro">println!</span>(<span class="string">"THREAD: i'm awake! sending."</span>);
|
||||
sender.send(<span class="number">3</span>).unwrap();
|
||||
});
|
||||
|
||||
<span class="macro">println!</span>(<span class="string">"MAIN: doing some useful stuff"</span>);
|
||||
|
||||
futures::executor::block_on(<span class="kw">async </span>{
|
||||
<span class="macro">println!</span>(<span class="string">"MAIN: waiting for msg..."</span>);
|
||||
<span class="macro">println!</span>(<span class="string">"MAIN: got: {:?}"</span>, receiver.<span class="kw">await</span>)
|
||||
});</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<!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="A channel for sending a single message between asynchronous tasks."><title>cosmic::iced::daemon::program::graphics::futures::futures::channel::oneshot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../../" data-static-root-path="../../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module oneshot</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>channel</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../../index.html">iced</a>::<wbr><a href="../../../../../../index.html">daemon</a>::<wbr><a href="../../../../../index.html">program</a>::<wbr><a href="../../../../index.html">graphics</a>::<wbr><a href="../../../index.html">futures</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">channel</a></div><h1>Module <span>oneshot</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A channel for sending a single message between asynchronous tasks.</p>
|
||||
<p>This is a single-producer, single-consumer channel.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Canceled.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::oneshot::Canceled">Canceled</a></dt><dd>Error returned from a <a href="struct.Receiver.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::oneshot::Receiver"><code>Receiver</code></a> when the corresponding <a href="struct.Sender.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::oneshot::Sender"><code>Sender</code></a> is
|
||||
dropped.</dd><dt><a class="struct" href="struct.Cancellation.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::oneshot::Cancellation">Cancellation</a></dt><dd>A future that resolves when the receiving end of a channel has hung up.</dd><dt><a class="struct" href="struct.Receiver.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::oneshot::Receiver">Receiver</a></dt><dd>A future for a value that will be provided by another asynchronous task.</dd><dt><a class="struct" href="struct.Sender.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::channel::oneshot::Sender">Sender</a></dt><dd>A means of transmitting a single value to another task.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.channel.html" title="fn cosmic::iced::daemon::program::graphics::futures::futures::channel::oneshot::channel">channel</a></dt><dd>Creates a new one-shot channel for sending a single value across asynchronous tasks.</dd></dl></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"fn":["channel"],"struct":["Canceled","Cancellation","Receiver","Sender"]};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"mod":["mpsc","oneshot"]};
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<!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="Run a future to completion on the current thread."><title>block_on in cosmic::iced::daemon::program::graphics::futures::futures::executor - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>executor</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">futures</a>::<wbr><a href="index.html">executor</a></div><h1>Function <span class="fn">block_on</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn block_on<F>(f: F) -> <F as <a class="trait" href="../trait.Future.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::Future">Future</a>>::<a class="associatedtype" href="../trait.Future.html#associatedtype.Output" title="type cosmic::iced::daemon::program::graphics::futures::futures::Future::Output">Output</a><div class="where">where
|
||||
F: <a class="trait" href="../trait.Future.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::Future">Future</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Run a future to completion on the current thread.</p>
|
||||
<p>This function will block the caller until the given future has completed.</p>
|
||||
<p>Use a <a href="struct.LocalPool.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::LocalPool"><code>LocalPool</code></a> if you need finer-grained control over spawned tasks.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<!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="Turn a stream into a blocking iterator."><title>block_on_stream in cosmic::iced::daemon::program::graphics::futures::futures::executor - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>executor</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">futures</a>::<wbr><a href="index.html">executor</a></div><h1>Function <span class="fn">block_on_stream</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn block_on_stream<S>(stream: S) -> <a class="struct" href="struct.BlockingStream.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::BlockingStream">BlockingStream</a><S> <a href="#" class="tooltip" data-notable-ty="BlockingStream<S>">ⓘ</a><div class="where">where
|
||||
S: <a class="trait" href="../trait.Stream.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::Stream">Stream</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Turn a stream into a blocking iterator.</p>
|
||||
<p>When <code>next</code> is called on the resulting <code>BlockingStream</code>, the caller
|
||||
will be blocked until the next element of the <code>Stream</code> becomes available.</p>
|
||||
</div></details><script type="text/json" id="notable-traits-data">{"BlockingStream<S>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.BlockingStream.html\" title=\"struct cosmic::iced::daemon::program::graphics::futures::futures::executor::BlockingStream\">BlockingStream</a><S></code></h3><pre><code><div class=\"where\">impl<S> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.BlockingStream.html\" title=\"struct cosmic::iced::daemon::program::graphics::futures::futures::executor::BlockingStream\">BlockingStream</a><S><div class=\"where\">where\n S: <a class=\"trait\" href=\"../trait.Stream.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Stream\">Stream</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <S as <a class=\"trait\" href=\"../trait.Stream.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Stream\">Stream</a>>::<a class=\"associatedtype\" href=\"../trait.Stream.html#associatedtype.Item\" title=\"type cosmic::iced::daemon::program::graphics::futures::futures::Stream::Item\">Item</a>;</div>"}</script></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<!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="Marks the current thread as being within the dynamic extent of an executor."><title>enter in cosmic::iced::daemon::program::graphics::futures::futures::executor - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">enter</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#error" title="Error">Error</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>executor</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">futures</a>::<wbr><a href="index.html">executor</a></div><h1>Function <span class="fn">enter</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn enter() -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.Enter.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::Enter">Enter</a>, <a class="struct" href="struct.EnterError.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::EnterError">EnterError</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Marks the current thread as being within the dynamic extent of an
|
||||
executor.</p>
|
||||
<p>Executor implementations should call this function before beginning to
|
||||
execute a task, and drop the returned <a href="struct.Enter.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::Enter"><code>Enter</code></a> value after
|
||||
completing task execution:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>futures::executor::enter;
|
||||
|
||||
<span class="kw">let </span>enter = enter().expect(<span class="string">"..."</span>);
|
||||
<span class="comment">/* run task */
|
||||
</span>drop(enter);</code></pre></div>
|
||||
<p>Doing so ensures that executors aren’t
|
||||
accidentally invoked in a nested fashion.</p>
|
||||
<h2 id="error"><a class="doc-anchor" href="#error">§</a>Error</h2>
|
||||
<p>Returns an error if the current thread is already marked, in which case the
|
||||
caller should panic with a tailored error message.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<!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="Built-in executors and related tools."><title>cosmic::iced::daemon::program::graphics::futures::futures::executor - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module executor</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#using-a-thread-pool-mn-task-scheduling" title="Using a thread pool (M:N task scheduling)">Using a thread pool (M:N task scheduling)</a></li><li><a href="#spawning-additional-tasks" title="Spawning additional tasks">Spawning additional tasks</a></li><li><a href="#single-threaded-execution" title="Single-threaded execution">Single-threaded execution</a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">futures</a></div><h1>Module <span>executor</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Built-in executors and related tools.</p>
|
||||
<p>All asynchronous computation occurs within an executor, which is
|
||||
capable of spawning futures as tasks. This module provides several
|
||||
built-in executors, as well as tools for building your own.</p>
|
||||
<p>This module is only available when the <code>executor</code> feature of this
|
||||
library is activated.</p>
|
||||
<h2 id="using-a-thread-pool-mn-task-scheduling"><a class="doc-anchor" href="#using-a-thread-pool-mn-task-scheduling">§</a>Using a thread pool (M:N task scheduling)</h2>
|
||||
<p>Most of the time tasks should be executed on a <a href="struct.ThreadPool.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::ThreadPool">thread pool</a>.
|
||||
A small set of worker threads can handle a very large set of spawned tasks
|
||||
(which are much lighter weight than threads). Tasks spawned onto the pool
|
||||
with the <a href="struct.ThreadPool.html#method.spawn_ok" title="method cosmic::iced::daemon::program::graphics::futures::futures::executor::ThreadPool::spawn_ok"><code>spawn_ok</code></a> function will run ambiently on
|
||||
the created threads.</p>
|
||||
<h2 id="spawning-additional-tasks"><a class="doc-anchor" href="#spawning-additional-tasks">§</a>Spawning additional tasks</h2>
|
||||
<p>Tasks can be spawned onto a spawner by calling its <a href="https://docs.rs/futures/0.3/futures/task/trait.Spawn.html#tymethod.spawn_obj"><code>spawn_obj</code></a> method
|
||||
directly. In the case of <code>!Send</code> futures, <a href="https://docs.rs/futures/0.3/futures/task/trait.LocalSpawn.html#tymethod.spawn_local_obj"><code>spawn_local_obj</code></a> can be used
|
||||
instead.</p>
|
||||
<h2 id="single-threaded-execution"><a class="doc-anchor" href="#single-threaded-execution">§</a>Single-threaded execution</h2>
|
||||
<p>In addition to thread pools, it’s possible to run a task (and the tasks
|
||||
it spawns) entirely within a single thread via the <a href="struct.LocalPool.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::LocalPool"><code>LocalPool</code></a> executor.
|
||||
Aside from cutting down on synchronization costs, this executor also makes
|
||||
it possible to spawn non-<code>Send</code> tasks, via <a href="https://docs.rs/futures/0.3/futures/task/trait.LocalSpawn.html#tymethod.spawn_local_obj"><code>spawn_local_obj</code></a>. The
|
||||
<a href="struct.LocalPool.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::LocalPool"><code>LocalPool</code></a> is best suited for running I/O-bound tasks that do relatively
|
||||
little work between I/O operations.</p>
|
||||
<p>There is also a convenience function <a href="fn.block_on.html" title="fn cosmic::iced::daemon::program::graphics::futures::futures::executor::block_on"><code>block_on</code></a> for simply running a
|
||||
future to completion on the current thread.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.BlockingStream.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::BlockingStream">Blocking<wbr>Stream</a></dt><dd>An iterator which blocks on values from a stream until they become available.</dd><dt><a class="struct" href="struct.Enter.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::Enter">Enter</a></dt><dd>Represents an executor context.</dd><dt><a class="struct" href="struct.EnterError.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::EnterError">Enter<wbr>Error</a></dt><dd>An error returned by <code>enter</code> if an execution scope has already been
|
||||
entered.</dd><dt><a class="struct" href="struct.LocalPool.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::LocalPool">Local<wbr>Pool</a></dt><dd>A single-threaded task pool for polling futures to completion.</dd><dt><a class="struct" href="struct.LocalSpawner.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::LocalSpawner">Local<wbr>Spawner</a></dt><dd>A handle to a <a href="struct.LocalPool.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::LocalPool"><code>LocalPool</code></a> that implements <a href="../task/trait.Spawn.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::task::Spawn"><code>Spawn</code></a>.</dd><dt><a class="struct" href="struct.ThreadPool.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::ThreadPool">Thread<wbr>Pool</a></dt><dd>A general-purpose thread pool for scheduling tasks that poll futures to
|
||||
completion.</dd><dt><a class="struct" href="struct.ThreadPoolBuilder.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::executor::ThreadPoolBuilder">Thread<wbr>Pool<wbr>Builder</a></dt><dd>Thread pool configuration object.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.block_on.html" title="fn cosmic::iced::daemon::program::graphics::futures::futures::executor::block_on">block_<wbr>on</a></dt><dd>Run a future to completion on the current thread.</dd><dt><a class="fn" href="fn.block_on_stream.html" title="fn cosmic::iced::daemon::program::graphics::futures::futures::executor::block_on_stream">block_<wbr>on_<wbr>stream</a></dt><dd>Turn a stream into a blocking iterator.</dd><dt><a class="fn" href="fn.enter.html" title="fn cosmic::iced::daemon::program::graphics::futures::futures::executor::enter">enter</a></dt><dd>Marks the current thread as being within the dynamic extent of an
|
||||
executor.</dd></dl></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"fn":["block_on","block_on_stream","enter"],"struct":["BlockingStream","Enter","EnterError","LocalPool","LocalSpawner","ThreadPool","ThreadPoolBuilder"]};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,87 @@
|
|||
<!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="Abstractions for asynchronous programming."><title>cosmic::iced::daemon::program::graphics::futures::futures - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../" data-static-root-path="../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../../../../../../../crates.js"></script><script defer src="../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#modules">Crate Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#macros" title="Macros">Macros</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../index.html">iced</a>::<wbr><a href="../../../../index.html">daemon</a>::<wbr><a href="../../../index.html">program</a>::<wbr><a href="../../index.html">graphics</a>::<wbr><a href="../index.html">futures</a></div><h1>Crate <span>futures</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Abstractions for asynchronous programming.</p>
|
||||
<p>This crate provides a number of core abstractions for writing asynchronous
|
||||
code:</p>
|
||||
<ul>
|
||||
<li><a href="prelude/future/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::prelude::future">Futures</a> are single eventual values produced by
|
||||
asynchronous computations. Some programming languages (e.g. JavaScript)
|
||||
call this concept “promise”.</li>
|
||||
<li><a href="prelude/stream/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::prelude::stream">Streams</a> represent a series of values
|
||||
produced asynchronously.</li>
|
||||
<li><a href="prelude/sink/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::prelude::sink">Sinks</a> provide support for asynchronous writing of
|
||||
data.</li>
|
||||
<li><a href="executor/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::executor">Executors</a> are responsible for running asynchronous
|
||||
tasks.</li>
|
||||
</ul>
|
||||
<p>The crate also contains abstractions for <a href="io/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::io">asynchronous I/O</a> and
|
||||
<a href="channel/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::channel">cross-task communication</a>.</p>
|
||||
<p>Underlying all of this is the <em>task system</em>, which is a form of lightweight
|
||||
threading. Large asynchronous computations are built up using futures,
|
||||
streams and sinks, and then spawned as independent tasks that are run to
|
||||
completion, but <em>do not block</em> the thread running them.</p>
|
||||
<p>The following example describes how the task system context is built and used
|
||||
within macros and keywords such as async and await!.</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">fn </span>main() {
|
||||
<span class="kw">let </span>pool = ThreadPool::new().expect(<span class="string">"Failed to build pool"</span>);
|
||||
<span class="kw">let </span>(tx, rx) = mpsc::unbounded::<i32>();
|
||||
|
||||
<span class="comment">// Create a future by an async block, where async is responsible for an
|
||||
// implementation of Future. At this point no executor has been provided
|
||||
// to this future, so it will not be running.
|
||||
</span><span class="kw">let </span>fut_values = <span class="kw">async </span>{
|
||||
<span class="comment">// Create another async block, again where the Future implementation
|
||||
// is generated by async. Since this is inside of a parent async block,
|
||||
// it will be provided with the executor of the parent block when the parent
|
||||
// block is executed.
|
||||
//
|
||||
// This executor chaining is done by Future::poll whose second argument
|
||||
// is a std::task::Context. This represents our executor, and the Future
|
||||
// implemented by this async block can be polled using the parent async
|
||||
// block's executor.
|
||||
</span><span class="kw">let </span>fut_tx_result = <span class="kw">async move </span>{
|
||||
(<span class="number">0</span>..<span class="number">100</span>).for_each(|v| {
|
||||
tx.unbounded_send(v).expect(<span class="string">"Failed to send"</span>);
|
||||
})
|
||||
};
|
||||
|
||||
<span class="comment">// Use the provided thread pool to spawn the generated future
|
||||
// responsible for transmission
|
||||
</span>pool.spawn_ok(fut_tx_result);
|
||||
|
||||
<span class="kw">let </span>fut_values = rx
|
||||
.map(|v| v * <span class="number">2</span>)
|
||||
.collect();
|
||||
|
||||
<span class="comment">// Use the executor provided to this async block to wait for the
|
||||
// future to complete.
|
||||
</span>fut_values.<span class="kw">await
|
||||
</span>};
|
||||
|
||||
<span class="comment">// Actually execute the above future, which will invoke Future::poll and
|
||||
// subsequently chain appropriate Future::poll and methods needing executors
|
||||
// to drive all futures. Eventually fut_values will be driven to completion.
|
||||
</span><span class="kw">let </span>values: Vec<i32> = executor::block_on(fut_values);
|
||||
|
||||
<span class="macro">println!</span>(<span class="string">"Values={:?}"</span>, values);
|
||||
}</code></pre></div>
|
||||
<p>The majority of examples and code snippets in this crate assume that they are
|
||||
inside an async block as written above.</p>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="channel/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::channel">channel</a></dt><dd>Asynchronous channels.</dd><dt><a class="mod" href="executor/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::executor">executor</a></dt><dd>Built-in executors and related tools.</dd><dt><a class="mod" href="io/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::io">io</a></dt><dd>Asynchronous I/O.</dd><dt><a class="mod" href="lock/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::lock">lock</a></dt><dd>Futures-powered synchronization primitives.</dd><dt><a class="mod" href="never/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::never">never</a></dt><dd>This module contains the <code>Never</code> type.</dd><dt><a class="mod" href="prelude/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::prelude">prelude</a></dt><dd>A “prelude” for crates using the <code>futures</code> crate.</dd><dt><a class="mod" href="task/index.html" title="mod cosmic::iced::daemon::program::graphics::futures::futures::task">task</a></dt><dd>Tools for working with tasks.</dd></dl><h2 id="macros" class="section-header">Macros<a href="#macros" class="anchor">§</a></h2><dl class="item-table"><dt><a class="macro" href="macro.join.html" title="macro cosmic::iced::daemon::program::graphics::futures::futures::join">join</a></dt><dd>Polls multiple futures simultaneously, returning a tuple
|
||||
of all results once complete.</dd><dt><a class="macro" href="macro.pending.html" title="macro cosmic::iced::daemon::program::graphics::futures::futures::pending">pending</a></dt><dd>A macro which yields to the event loop once.</dd><dt><a class="macro" href="macro.pin_mut.html" title="macro cosmic::iced::daemon::program::graphics::futures::futures::pin_mut">pin_mut</a></dt><dd>Pins a value on the stack.</dd><dt><a class="macro" href="macro.poll.html" title="macro cosmic::iced::daemon::program::graphics::futures::futures::poll">poll</a></dt><dd>A macro which returns the result of polling a future once within the
|
||||
current <code>async</code> context.</dd><dt><a class="macro" href="macro.ready.html" title="macro cosmic::iced::daemon::program::graphics::futures::futures::ready">ready</a></dt><dd>Extracts the successful type of <code>Poll<T></code>.</dd><dt><a class="macro" href="macro.select.html" title="macro cosmic::iced::daemon::program::graphics::futures::futures::select">select</a></dt><dd>Polls multiple futures and streams simultaneously, executing the branch
|
||||
for the future that finishes first. If multiple futures are ready,
|
||||
one will be pseudo-randomly selected at runtime. Futures directly
|
||||
passed to <code>select!</code> must be <code>Unpin</code> and implement <code>FusedFuture</code>.</dd><dt><a class="macro" href="macro.select_biased.html" title="macro cosmic::iced::daemon::program::graphics::futures::futures::select_biased">select_<wbr>biased</a></dt><dd>Polls multiple futures and streams simultaneously, executing the branch
|
||||
for the future that finishes first. Unlike <a href="macro.select.html"><code>select!</code></a>, if multiple futures are ready,
|
||||
one will be selected in order of declaration. Futures directly
|
||||
passed to <code>select_biased!</code> must be <code>Unpin</code> and implement <code>FusedFuture</code>.</dd><dt><a class="macro" href="macro.stream_select.html" title="macro cosmic::iced::daemon::program::graphics::futures::futures::stream_select">stream_<wbr>select</a></dt><dd>Combines several streams, all producing the same <code>Item</code> type, into one stream.
|
||||
This is similar to <code>select_all</code> but does not require the streams to all be the same type.
|
||||
It also keeps the streams inline, and does not require <code>Box<dyn Stream></code>s to be allocated.
|
||||
Streams passed to this macro must be <code>Unpin</code>.</dd><dt><a class="macro" href="macro.try_join.html" title="macro cosmic::iced::daemon::program::graphics::futures::futures::try_join">try_<wbr>join</a></dt><dd>Polls multiple futures simultaneously, resolving to a <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result"><code>Result</code></a> containing
|
||||
either a tuple of the successful outputs or an error.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.AsyncBufRead.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncBufRead">Async<wbr>BufRead</a></dt><dd>Read bytes asynchronously.</dd><dt><a class="trait" href="trait.AsyncBufReadExt.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncBufReadExt">Async<wbr>BufRead<wbr>Ext</a></dt><dd>An extension trait which adds utility methods to <code>AsyncBufRead</code> types.</dd><dt><a class="trait" href="trait.AsyncRead.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncRead">Async<wbr>Read</a></dt><dd>Read bytes asynchronously.</dd><dt><a class="trait" href="trait.AsyncReadExt.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncReadExt">Async<wbr>Read<wbr>Ext</a></dt><dd>An extension trait which adds utility methods to <code>AsyncRead</code> types.</dd><dt><a class="trait" href="trait.AsyncSeek.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncSeek">Async<wbr>Seek</a></dt><dd>Seek bytes asynchronously.</dd><dt><a class="trait" href="trait.AsyncSeekExt.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncSeekExt">Async<wbr>Seek<wbr>Ext</a></dt><dd>An extension trait which adds utility methods to <code>AsyncSeek</code> types.</dd><dt><a class="trait" href="trait.AsyncWrite.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncWrite">Async<wbr>Write</a></dt><dd>Write bytes asynchronously.</dd><dt><a class="trait" href="trait.AsyncWriteExt.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncWriteExt">Async<wbr>Write<wbr>Ext</a></dt><dd>An extension trait which adds utility methods to <code>AsyncWrite</code> types.</dd><dt><a class="trait" href="trait.Future.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::Future">Future</a></dt><dd>A future represents an asynchronous computation, commonly obtained by use of
|
||||
<a href="../../std/keyword.async.html"><code>async</code></a>.</dd><dt><a class="trait" href="trait.FutureExt.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::FutureExt">Future<wbr>Ext</a></dt><dd>An extension trait for <code>Future</code>s that provides a variety of convenient
|
||||
adapters.</dd><dt><a class="trait" href="trait.Sink.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::Sink">Sink</a></dt><dd>A <code>Sink</code> is a value into which other values can be sent, asynchronously.</dd><dt><a class="trait" href="trait.SinkExt.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::SinkExt">SinkExt</a></dt><dd>An extension trait for <code>Sink</code>s that provides a variety of convenient
|
||||
combinator functions.</dd><dt><a class="trait" href="trait.Stream.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::Stream">Stream</a></dt><dd>A stream of values produced asynchronously.</dd><dt><a class="trait" href="trait.StreamExt.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::StreamExt">Stream<wbr>Ext</a></dt><dd>An extension trait for <code>Stream</code>s that provides a variety of convenient
|
||||
combinator functions.</dd><dt><a class="trait" href="trait.TryFuture.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::TryFuture">TryFuture</a></dt><dd>A convenience for futures that return <code>Result</code> values that includes
|
||||
a variety of adapters tailored to such futures.</dd><dt><a class="trait" href="trait.TryFutureExt.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::TryFutureExt">TryFuture<wbr>Ext</a></dt><dd>Adapters specific to <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result"><code>Result</code></a>-returning futures</dd><dt><a class="trait" href="trait.TryStream.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::TryStream">TryStream</a></dt><dd>A convenience for streams that return <code>Result</code> values that includes
|
||||
a variety of adapters tailored to such futures.</dd><dt><a class="trait" href="trait.TryStreamExt.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::TryStreamExt">TryStream<wbr>Ext</a></dt><dd>Adapters specific to <code>Result</code>-returning streams</dd></dl></section></div></main></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,20 @@
|
|||
<!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="Creates a future which copies all the bytes from one object to another."><title>copy in cosmic::iced::daemon::program::graphics::futures::futures::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">copy</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">futures</a>::<wbr><a href="index.html">io</a></div><h1>Function <span class="fn">copy</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn copy<R, W>(reader: R, writer: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut W</a>) -> <a class="struct" href="struct.Copy.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::io::Copy">Copy</a><'_, R, W> <a href="#" class="tooltip" data-notable-ty="Copy<'_, R, W>">ⓘ</a><div class="where">where
|
||||
R: <a class="trait" href="../trait.AsyncRead.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncRead">AsyncRead</a>,
|
||||
W: <a class="trait" href="../trait.AsyncWrite.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncWrite">AsyncWrite</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a future which copies all the bytes from one object to another.</p>
|
||||
<p>The returned future will copy all the bytes read from this <code>AsyncRead</code> into the
|
||||
<code>writer</code> specified. This future will only complete once the <code>reader</code> has hit
|
||||
EOF and all bytes have been written to and flushed from the <code>writer</code>
|
||||
provided.</p>
|
||||
<p>On success the number of bytes is returned.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>futures::io::{<span class="self">self</span>, AsyncWriteExt, Cursor};
|
||||
|
||||
<span class="kw">let </span>reader = Cursor::new([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>writer = Cursor::new(<span class="macro">vec!</span>[<span class="number">0u8</span>; <span class="number">5</span>]);
|
||||
|
||||
<span class="kw">let </span>bytes = io::copy(reader, <span class="kw-2">&mut </span>writer).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
writer.close().<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
|
||||
<span class="macro">assert_eq!</span>(bytes, <span class="number">4</span>);
|
||||
<span class="macro">assert_eq!</span>(writer.into_inner(), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">0</span>]);</code></pre></div>
|
||||
</div></details><script type="text/json" id="notable-traits-data">{"Copy<'_, R, W>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Copy.html\" title=\"struct cosmic::iced::daemon::program::graphics::futures::futures::io::Copy\">Copy</a><'_, R, W></code></h3><pre><code><div class=\"where\">impl<R, W> <a class=\"trait\" href=\"../trait.Future.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Future\">Future</a> for <a class=\"struct\" href=\"struct.Copy.html\" title=\"struct cosmic::iced::daemon::program::graphics::futures::futures::io::Copy\">Copy</a><'_, R, W><div class=\"where\">where\n R: <a class=\"trait\" href=\"../trait.AsyncRead.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncRead\">AsyncRead</a>,\n W: <a class=\"trait\" href=\"../trait.AsyncWrite.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncWrite\">AsyncWrite</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> + ?<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a>,</div></div><div class=\"where\"> type <a href=\"../trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u64.html\">u64</a>, <a class=\"struct\" href=\"struct.Error.html\" title=\"struct cosmic::iced::daemon::program::graphics::futures::futures::io::Error\">Error</a>>;</div>"}</script></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<!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="Creates a future which copies all the bytes from one object to another."><title>copy_buf in cosmic::iced::daemon::program::graphics::futures::futures::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">copy_<wbr>buf</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">futures</a>::<wbr><a href="index.html">io</a></div><h1>Function <span class="fn">copy_buf</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn copy_buf<R, W>(reader: R, writer: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut W</a>) -> <a class="struct" href="struct.CopyBuf.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::io::CopyBuf">CopyBuf</a><'_, R, W> <a href="#" class="tooltip" data-notable-ty="CopyBuf<'_, R, W>">ⓘ</a><div class="where">where
|
||||
R: <a class="trait" href="../trait.AsyncBufRead.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncBufRead">AsyncBufRead</a>,
|
||||
W: <a class="trait" href="../trait.AsyncWrite.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncWrite">AsyncWrite</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a future which copies all the bytes from one object to another.</p>
|
||||
<p>The returned future will copy all the bytes read from this <code>AsyncBufRead</code> into the
|
||||
<code>writer</code> specified. This future will only complete once the <code>reader</code> has hit
|
||||
EOF and all bytes have been written to and flushed from the <code>writer</code>
|
||||
provided.</p>
|
||||
<p>On success the number of bytes is returned.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>futures::io::{<span class="self">self</span>, AsyncWriteExt, Cursor};
|
||||
|
||||
<span class="kw">let </span>reader = Cursor::new([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>writer = Cursor::new(<span class="macro">vec!</span>[<span class="number">0u8</span>; <span class="number">5</span>]);
|
||||
|
||||
<span class="kw">let </span>bytes = io::copy_buf(reader, <span class="kw-2">&mut </span>writer).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
writer.close().<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
|
||||
<span class="macro">assert_eq!</span>(bytes, <span class="number">4</span>);
|
||||
<span class="macro">assert_eq!</span>(writer.into_inner(), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">0</span>]);</code></pre></div>
|
||||
</div></details><script type="text/json" id="notable-traits-data">{"CopyBuf<'_, R, W>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.CopyBuf.html\" title=\"struct cosmic::iced::daemon::program::graphics::futures::futures::io::CopyBuf\">CopyBuf</a><'_, R, W></code></h3><pre><code><div class=\"where\">impl<R, W> <a class=\"trait\" href=\"../trait.Future.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::Future\">Future</a> for <a class=\"struct\" href=\"struct.CopyBuf.html\" title=\"struct cosmic::iced::daemon::program::graphics::futures::futures::io::CopyBuf\">CopyBuf</a><'_, R, W><div class=\"where\">where\n R: <a class=\"trait\" href=\"../trait.AsyncBufRead.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncBufRead\">AsyncBufRead</a>,\n W: <a class=\"trait\" href=\"../trait.AsyncWrite.html\" title=\"trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncWrite\">AsyncWrite</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> + ?<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a>,</div></div><div class=\"where\"> type <a href=\"../trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u64.html\">u64</a>, <a class=\"struct\" href=\"struct.Error.html\" title=\"struct cosmic::iced::daemon::program::graphics::futures::futures::io::Error\">Error</a>>;</div>"}</script></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<!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="Creates a future which copies all the bytes from one object to another, with its `AbortHandle`."><title>copy_buf_abortable in cosmic::iced::daemon::program::graphics::futures::futures::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">copy_<wbr>buf_<wbr>abortable</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">futures</a>::<wbr><a href="index.html">io</a></div><h1>Function <span class="fn">copy_buf_abortable</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn copy_buf_abortable<R, W>(
|
||||
reader: R,
|
||||
writer: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut W</a>,
|
||||
) -> (<a class="struct" href="struct.CopyBufAbortable.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::io::CopyBufAbortable">CopyBufAbortable</a><'_, R, W>, <a class="struct" href="../prelude/future/struct.AbortHandle.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::prelude::future::AbortHandle">AbortHandle</a>)<div class="where">where
|
||||
R: <a class="trait" href="../trait.AsyncBufRead.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncBufRead">AsyncBufRead</a>,
|
||||
W: <a class="trait" href="../trait.AsyncWrite.html" title="trait cosmic::iced::daemon::program::graphics::futures::futures::AsyncWrite">AsyncWrite</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a future which copies all the bytes from one object to another, with its <code>AbortHandle</code>.</p>
|
||||
<p>The returned future will copy all the bytes read from this <code>AsyncBufRead</code> into the
|
||||
<code>writer</code> specified. This future will only complete once abort has been requested or the <code>reader</code> has hit
|
||||
EOF and all bytes have been written to and flushed from the <code>writer</code>
|
||||
provided.</p>
|
||||
<p>On success the number of bytes is returned. If aborted, <code>Aborted</code> is returned. Otherwise, the underlying error is returned.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>futures::io::{<span class="self">self</span>, AsyncWriteExt, Cursor};
|
||||
<span class="kw">use </span>futures::future::Aborted;
|
||||
|
||||
<span class="kw">let </span>reader = Cursor::new([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>writer = Cursor::new(<span class="macro">vec!</span>[<span class="number">0u8</span>; <span class="number">5</span>]);
|
||||
|
||||
<span class="kw">let </span>(fut, abort_handle) = io::copy_buf_abortable(reader, <span class="kw-2">&mut </span>writer);
|
||||
<span class="kw">let </span>bytes = fut.<span class="kw">await</span>;
|
||||
abort_handle.abort();
|
||||
writer.close().<span class="kw">await</span>.unwrap();
|
||||
<span class="kw">match </span>bytes {
|
||||
<span class="prelude-val">Ok</span>(<span class="prelude-val">Ok</span>(n)) => {
|
||||
<span class="macro">assert_eq!</span>(n, <span class="number">4</span>);
|
||||
<span class="macro">assert_eq!</span>(writer.into_inner(), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">0</span>]);
|
||||
<span class="prelude-val">Ok</span>(n)
|
||||
},
|
||||
<span class="prelude-val">Ok</span>(<span class="prelude-val">Err</span>(a)) => {
|
||||
<span class="prelude-val">Err</span>::<u64, Aborted>(a)
|
||||
}
|
||||
<span class="prelude-val">Err</span>(e) => <span class="macro">panic!</span>(<span class="string">"{}"</span>, e)
|
||||
}</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<!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="Constructs a new handle to an empty reader."><title>empty in cosmic::iced::daemon::program::graphics::futures::futures::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">empty</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">futures</a>::<wbr><a href="index.html">io</a></div><h1>Function <span class="fn">empty</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn empty() -> <a class="struct" href="struct.Empty.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::io::Empty">Empty</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Constructs a new handle to an empty reader.</p>
|
||||
<p>All reads from the returned reader will return <code>Poll::Ready(Ok(0))</code>.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>A slightly sad example of not reading anything into a buffer:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>futures::io::{<span class="self">self</span>, AsyncReadExt};
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>buffer = String::new();
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>reader = io::empty();
|
||||
reader.read_to_string(<span class="kw-2">&mut </span>buffer).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="macro">assert!</span>(buffer.is_empty());</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!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="Creates an instance of a reader that infinitely repeats one byte."><title>repeat in cosmic::iced::daemon::program::graphics::futures::futures::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">repeat</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">futures</a>::<wbr><a href="index.html">io</a></div><h1>Function <span class="fn">repeat</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn repeat(byte: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> <a class="struct" href="struct.Repeat.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::io::Repeat">Repeat</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates an instance of a reader that infinitely repeats one byte.</p>
|
||||
<p>All reads from this reader will succeed by filling the specified buffer with
|
||||
the given byte.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>futures::io::{<span class="self">self</span>, AsyncReadExt};
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>buffer = [<span class="number">0</span>; <span class="number">3</span>];
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>reader = io::repeat(<span class="number">0b101</span>);
|
||||
reader.read_exact(<span class="kw-2">&mut </span>buffer).<span class="kw">await</span>.unwrap();
|
||||
<span class="macro">assert_eq!</span>(buffer, [<span class="number">0b101</span>, <span class="number">0b101</span>, <span class="number">0b101</span>]);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!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="Creates an instance of a writer which will successfully consume all data."><title>sink in cosmic::iced::daemon::program::graphics::futures::futures::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../../" data-static-root-path="../../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">sink</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>futures::<wbr>futures::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../../index.html">iced</a>::<wbr><a href="../../../../../index.html">daemon</a>::<wbr><a href="../../../../index.html">program</a>::<wbr><a href="../../../index.html">graphics</a>::<wbr><a href="../../index.html">futures</a>::<wbr><a href="../index.html">futures</a>::<wbr><a href="index.html">io</a></div><h1>Function <span class="fn">sink</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn sink() -> <a class="struct" href="struct.Sink.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::io::Sink">Sink</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates an instance of a writer which will successfully consume all data.</p>
|
||||
<p>All calls to <code>poll_write</code> on the returned instance will return <code>Poll::Ready(Ok(buf.len()))</code>
|
||||
and the contents of the buffer will not be inspected.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>futures::io::{<span class="self">self</span>, AsyncWriteExt};
|
||||
|
||||
<span class="kw">let </span>buffer = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>];
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>writer = io::sink();
|
||||
<span class="kw">let </span>num_bytes = writer.write(<span class="kw-2">&</span>buffer).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="macro">assert_eq!</span>(num_bytes, <span class="number">5</span>);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"enum":["ErrorKind","SeekFrom"],"fn":["copy","copy_buf","copy_buf_abortable","empty","repeat","sink"],"struct":["AllowStdIo","BufReader","BufWriter","Chain","Close","Copy","CopyBuf","CopyBufAbortable","Cursor","Empty","Error","FillBuf","Flush","IntoSink","IoSlice","IoSliceMut","LineWriter","Lines","Read","ReadExact","ReadHalf","ReadLine","ReadToEnd","ReadToString","ReadUntil","ReadVectored","Repeat","ReuniteError","SeeKRelative","Seek","Sink","Take","Window","Write","WriteAll","WriteHalf","WriteVectored"],"trait":["AsyncBufRead","AsyncBufReadExt","AsyncRead","AsyncReadExt","AsyncSeek","AsyncSeekExt","AsyncWrite","AsyncWriteExt"],"type":["Result"]};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue