This commit is contained in:
wash2 2026-04-18 20:11:25 +00:00
commit 0fa87f2b35
16382 changed files with 734838 additions and 0 deletions

View file

@ -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 an iced `Application` given its boot, update, and view logic."><title>application in cosmic::iced::application - 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="#">application</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>application</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">application</a></div><h1>Function <span class="fn">application</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 application&lt;State, Message, Theme, Renderer&gt;(
boot: impl <a class="trait" href="trait.BootFn.html" title="trait cosmic::iced::application::BootFn">BootFn</a>&lt;State, Message&gt;,
update: impl <a class="trait" href="trait.UpdateFn.html" title="trait cosmic::iced::application::UpdateFn">UpdateFn</a>&lt;State, Message&gt;,
view: impl for&lt;'a&gt; <a class="trait" href="trait.ViewFn.html" title="trait cosmic::iced::application::ViewFn">ViewFn</a>&lt;'a, State, Message, Theme, Renderer&gt;,
) -&gt; <a class="struct" href="../struct.Application.html" title="struct cosmic::iced::Application">Application</a>&lt;impl <a class="trait" href="../trait.Program.html" title="trait cosmic::iced::Program">Program</a>&lt;State = State, Message = Message, Theme = Theme&gt;&gt;<div class="where">where
State: 'static,
Message: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,
Theme: <a class="trait" href="../daemon/program/graphics/core/theme/trait.Base.html" title="trait cosmic::iced::daemon::program::graphics::core::theme::Base">Base</a>,
Renderer: <a class="trait" href="../daemon/program/trait.Renderer.html" title="trait cosmic::iced::daemon::program::Renderer">Renderer</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates an iced <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a> given its boot, update, and view logic.</p>
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>iced::widget::{button, column, text, Column};
<span class="kw">pub fn </span>main() -&gt; iced::Result {
iced::application(u64::default, update, view).run()
}
<span class="attr">#[derive(Debug, Clone)]
</span><span class="kw">enum </span>Message {
Increment,
}
<span class="kw">fn </span>update(value: <span class="kw-2">&amp;mut </span>u64, message: Message) {
<span class="kw">match </span>message {
Message::Increment =&gt; <span class="kw-2">*</span>value += <span class="number">1</span>,
}
}
<span class="kw">fn </span>view(value: <span class="kw-2">&amp;</span>u64) -&gt; Column&lt;Message&gt; {
<span class="macro">column!</span>[
text(value),
button(<span class="string">"+"</span>).on_press(Message::Increment),
]
}</code></pre></div>
</div></details></section></div></main></body></html>

View file

@ -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="Creates an `Application` with an `update` function that also takes the `Instant` of each `Message`."><title>timed in cosmic::iced::application - 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>application</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">application</a></div><h1>Function <span class="fn">timed</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 timed&lt;State, Message, Theme, Renderer&gt;(
boot: impl <a class="trait" href="trait.BootFn.html" title="trait cosmic::iced::application::BootFn">BootFn</a>&lt;State, Message&gt;,
update: impl <a class="trait" href="timed/trait.UpdateFn.html" title="trait cosmic::iced::application::timed::UpdateFn">UpdateFn</a>&lt;State, Message&gt;,
subscription: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;State</a>) -&gt; <a class="struct" href="../struct.Subscription.html" title="struct cosmic::iced::Subscription">Subscription</a>&lt;Message&gt;,
view: impl for&lt;'a&gt; <a class="trait" href="trait.ViewFn.html" title="trait cosmic::iced::application::ViewFn">ViewFn</a>&lt;'a, State, Message, Theme, Renderer&gt;,
) -&gt; <a class="struct" href="../struct.Application.html" title="struct cosmic::iced::Application">Application</a>&lt;impl <a class="trait" href="../trait.Program.html" title="trait cosmic::iced::Program">Program</a>&lt;State = State, Message = (Message, <a class="struct" href="../time/struct.Instant.html" title="struct cosmic::iced::time::Instant">Instant</a>), Theme = Theme&gt;&gt;<div class="where">where
State: 'static,
Message: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,
Theme: <a class="trait" href="../daemon/program/graphics/core/theme/trait.Base.html" title="trait cosmic::iced::daemon::program::graphics::core::theme::Base">Base</a> + 'static,
Renderer: <a class="trait" href="../daemon/program/trait.Renderer.html" title="trait cosmic::iced::daemon::program::Renderer">Renderer</a> + 'static,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates an <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a> with an <code>update</code> function that also
takes the <a href="../time/struct.Instant.html" title="struct cosmic::iced::time::Instant"><code>Instant</code></a> of each <code>Message</code>.</p>
<p>This constructor is useful to create animated applications that
are <em>pure</em> (e.g. without relying on side-effect calls like <a href="../time/struct.Instant.html#method.now" title="associated function cosmic::iced::time::Instant::now"><code>Instant::now</code></a>).</p>
<p>Purity is needed when you want your application to end up in the
same exact state given the same history of messages. This property
enables proper time traveling debugging with <a href="https://github.com/iced-rs/comet"><code>comet</code></a>.</p>
</div></details></section></div></main></body></html>

View file

@ -0,0 +1,31 @@
<!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="Create and run iced applications step by step."><title>cosmic::iced::application - 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 application</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a></li></ul><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><li><a href="#traits" title="Traits">Traits</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</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></div><h1>Module <span>application</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>Create and run iced applications step by step.</p>
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>iced::widget::{button, column, text, Column};
<span class="kw">use </span>iced::Theme;
<span class="kw">pub fn </span>main() -&gt; iced::Result {
iced::application(u64::default, update, view)
.theme(Theme::Dark)
.centered()
.run()
}
<span class="attr">#[derive(Debug, Clone)]
</span><span class="kw">enum </span>Message {
Increment,
}
<span class="kw">fn </span>update(value: <span class="kw-2">&amp;mut </span>u64, message: Message) {
<span class="kw">match </span>message {
Message::Increment =&gt; <span class="kw-2">*</span>value += <span class="number">1</span>,
}
}
<span class="kw">fn </span>view(value: <span class="kw-2">&amp;</span>u64) -&gt; Column&lt;Message&gt; {
<span class="macro">column!</span>[
text(value),
button(<span class="string">"+"</span>).on_press(Message::Increment),
]
}</code></pre></div>
</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="timed/index.html" title="mod cosmic::iced::application::timed">timed</a></dt><dd>An <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a> that receives an <a href="../time/struct.Instant.html" title="struct cosmic::iced::time::Instant"><code>Instant</code></a> in update logic.</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.Application.html" title="struct cosmic::iced::application::Application">Application</a></dt><dd>The underlying definition and configuration of an iced application.</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.BootFn.html" title="trait cosmic::iced::application::BootFn">BootFn</a></dt><dd>The logic to initialize the <code>State</code> of some <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</dd><dt><a class="trait" href="trait.IntoBoot.html" title="trait cosmic::iced::application::IntoBoot">Into<wbr>Boot</a></dt><dd>The initial state of some <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</dd><dt><a class="trait" href="trait.ThemeFn.html" title="trait cosmic::iced::application::ThemeFn">ThemeFn</a></dt><dd>The theme logic of some <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</dd><dt><a class="trait" href="trait.TitleFn.html" title="trait cosmic::iced::application::TitleFn">TitleFn</a></dt><dd>The title logic of some <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</dd><dt><a class="trait" href="trait.UpdateFn.html" title="trait cosmic::iced::application::UpdateFn">Update<wbr>Fn</a></dt><dd>The update logic of some <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</dd><dt><a class="trait" href="trait.ViewFn.html" title="trait cosmic::iced::application::ViewFn">ViewFn</a></dt><dd>The view logic of some <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</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.application.html" title="fn cosmic::iced::application::application">application</a></dt><dd>Creates an iced <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a> given its boot, update, and view logic.</dd><dt><a class="fn" href="fn.timed.html" title="fn cosmic::iced::application::timed">timed</a></dt><dd>Creates an <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a> with an <code>update</code> function that also
takes the <a href="../time/struct.Instant.html" title="struct cosmic::iced::time::Instant"><code>Instant</code></a> of each <code>Message</code>.</dd></dl></section></div></main></body></html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"fn":["application","timed"],"mod":["timed"],"struct":["Application"],"trait":["BootFn","IntoBoot","ThemeFn","TitleFn","UpdateFn","ViewFn"]};

File diff suppressed because one or more lines are too long

View file

@ -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="Creates an `Application` with an `update` function that also takes the `Instant` of each `Message`."><title>timed in cosmic::iced::application::timed - 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>application::<wbr>timed</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">application</a>::<wbr><a href="index.html">timed</a></div><h1>Function <span class="fn">timed</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 timed&lt;State, Message, Theme, Renderer&gt;(
boot: impl <a class="trait" href="../trait.BootFn.html" title="trait cosmic::iced::application::BootFn">BootFn</a>&lt;State, Message&gt;,
update: impl <a class="trait" href="trait.UpdateFn.html" title="trait cosmic::iced::application::timed::UpdateFn">UpdateFn</a>&lt;State, Message&gt;,
subscription: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;State</a>) -&gt; <a class="struct" href="../../struct.Subscription.html" title="struct cosmic::iced::Subscription">Subscription</a>&lt;Message&gt;,
view: impl for&lt;'a&gt; <a class="trait" href="../trait.ViewFn.html" title="trait cosmic::iced::application::ViewFn">ViewFn</a>&lt;'a, State, Message, Theme, Renderer&gt;,
) -&gt; <a class="struct" href="../../struct.Application.html" title="struct cosmic::iced::Application">Application</a>&lt;impl <a class="trait" href="../../trait.Program.html" title="trait cosmic::iced::Program">Program</a>&lt;State = State, Message = (Message, <a class="struct" href="../../time/struct.Instant.html" title="struct cosmic::iced::time::Instant">Instant</a>), Theme = Theme&gt;&gt;<div class="where">where
State: 'static,
Message: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,
Theme: <a class="trait" href="../../daemon/program/graphics/core/theme/trait.Base.html" title="trait cosmic::iced::daemon::program::graphics::core::theme::Base">Base</a> + 'static,
Renderer: <a class="trait" href="../../daemon/program/trait.Renderer.html" title="trait cosmic::iced::daemon::program::Renderer">Renderer</a> + 'static,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates an <a href="../../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a> with an <code>update</code> function that also
takes the <a href="../../time/struct.Instant.html" title="struct cosmic::iced::time::Instant"><code>Instant</code></a> of each <code>Message</code>.</p>
<p>This constructor is useful to create animated applications that
are <em>pure</em> (e.g. without relying on side-effect calls like <a href="../../time/struct.Instant.html#method.now" title="associated function cosmic::iced::time::Instant::now"><code>Instant::now</code></a>).</p>
<p>Purity is needed when you want your application to end up in the
same exact state given the same history of messages. This property
enables proper time traveling debugging with <a href="https://github.com/iced-rs/comet"><code>comet</code></a>.</p>
</div></details></section></div></main></body></html>

View file

@ -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="An `Application` that receives an `Instant` in update logic."><title>cosmic::iced::application::timed - 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 timed</a></h2><h3><a href="#traits">Module Items</a></h3><ul class="block"><li><a href="#traits" title="Traits">Traits</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>application</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">application</a></div><h1>Module <span>timed</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>An <a href="../../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a> that receives an <a href="../../time/struct.Instant.html" title="struct cosmic::iced::time::Instant"><code>Instant</code></a> in update logic.</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.UpdateFn.html" title="trait cosmic::iced::application::timed::UpdateFn">Update<wbr>Fn</a></dt><dd>The update logic of some timed <a href="../../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</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.timed.html" title="fn cosmic::iced::application::timed::timed">timed</a></dt><dd>Creates an <a href="../../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a> with an <code>update</code> function that also
takes the <a href="../../time/struct.Instant.html" title="struct cosmic::iced::time::Instant"><code>Instant</code></a> of each <code>Message</code>.</dd></dl></section></div></main></body></html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"fn":["timed"],"trait":["UpdateFn"]};

View file

@ -0,0 +1,25 @@
<!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 update logic of some timed `Application`."><title>UpdateFn in cosmic::iced::application::timed - 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 trait"><!--[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="#">Update<wbr>Fn</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.update" title="update">update</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-UpdateFn%3CState,+Message%3E-for-()" title="()">()</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>application::<wbr>timed</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">application</a>::<wbr><a href="index.html">timed</a></div><h1>Trait <span class="trait">UpdateFn</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 trait UpdateFn&lt;State, Message&gt; {
// Required method
fn <a href="#tymethod.update" class="fn">update</a>(
&amp;self,
state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut State</a>,
message: Message,
now: <a class="struct" href="../../time/struct.Instant.html" title="struct cosmic::iced::time::Instant">Instant</a>,
) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;Message&gt;&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The update logic of some timed <a href="../../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</p>
<p>This is like <a href="../trait.UpdateFn.html" title="trait cosmic::iced::application::UpdateFn"><code>application::UpdateFn</code></a>,
but it also takes an <a href="../../time/struct.Instant.html" title="struct cosmic::iced::time::Instant"><code>Instant</code></a>.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.update" class="method"><h4 class="code-header">fn <a href="#tymethod.update" class="fn">update</a>(
&amp;self,
state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut State</a>,
message: Message,
now: <a class="struct" href="../../time/struct.Instant.html" title="struct cosmic::iced::time::Instant">Instant</a>,
) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;Message&gt;&gt;</h4></section></summary><div class="docblock"><p>Processes the message and updates the state of the <a href="../../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-UpdateFn%3CState,+Message%3E-for-()" class="impl"><a href="#impl-UpdateFn%3CState,+Message%3E-for-()" class="anchor">§</a><h3 class="code-header">impl&lt;State, Message&gt; <a class="trait" href="trait.UpdateFn.html" title="trait cosmic::iced::application::timed::UpdateFn">UpdateFn</a>&lt;State, Message&gt; for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h3></section></summary><div class="impl-items"><section id="method.update" class="method trait-impl"><a href="#method.update" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.update" class="fn">update</a>(
&amp;self,
_state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut State</a>,
_message: Message,
_now: <a class="struct" href="../../time/struct.Instant.html" title="struct cosmic::iced::time::Instant">Instant</a>,
) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;Message&gt;&gt;</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-UpdateFn%3CState,+Message%3E-for-T" class="impl"><a href="#impl-UpdateFn%3CState,+Message%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, State, Message, C&gt; <a class="trait" href="trait.UpdateFn.html" title="trait cosmic::iced::application::timed::UpdateFn">UpdateFn</a>&lt;State, Message&gt; for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut State</a>, Message, <a class="struct" href="../../time/struct.Instant.html" title="struct cosmic::iced::time::Instant">Instant</a>) -&gt; C,
C: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;Message&gt;&gt;,</div></h3></section></div><script src="../../../../trait.impl/iced/application/timed/trait.UpdateFn.js" data-ignore-extern-crates="std" async></script></section></div></main></body></html>

View file

@ -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="The logic to initialize the `State` of some `Application`."><title>BootFn in cosmic::iced::application - 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 trait"><!--[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="#">BootFn</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.boot" title="boot">boot</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>application</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">application</a></div><h1>Trait <span class="trait">BootFn</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 trait BootFn&lt;State, Message&gt; {
// Required method
fn <a href="#tymethod.boot" class="fn">boot</a>(&amp;self) -&gt; (State, <a class="struct" href="../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;Message&gt;);
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The logic to initialize the <code>State</code> of some <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</p>
<p>This trait is implemented for both <code>Fn() -&gt; State</code> and
<code>Fn() -&gt; (State, Task&lt;Message&gt;)</code>.</p>
<p>In practice, this means that <a href="../fn.application.html" title="fn cosmic::iced::application"><code>application</code></a> can both take
simple functions like <code>State::default</code> and more advanced ones
that return a <a href="../../struct.Task.html" title="struct cosmic::Task"><code>Task</code></a>.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.boot" class="method"><h4 class="code-header">fn <a href="#tymethod.boot" class="fn">boot</a>(&amp;self) -&gt; (State, <a class="struct" href="../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;Message&gt;)</h4></section></summary><div class="docblock"><p>Initializes the <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a> state.</p>
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-BootFn%3CState,+Message%3E-for-T" class="impl"><a href="#impl-BootFn%3CState,+Message%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, C, State, Message&gt; <a class="trait" href="trait.BootFn.html" title="trait cosmic::iced::application::BootFn">BootFn</a>&lt;State, Message&gt; for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>() -&gt; C,
C: <a class="trait" href="trait.IntoBoot.html" title="trait cosmic::iced::application::IntoBoot">IntoBoot</a>&lt;State, Message&gt;,</div></h3></section></div><script src="../../../trait.impl/iced/application/trait.BootFn.js" async></script></section></div></main></body></html>

View file

@ -0,0 +1,6 @@
<!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 initial state of some `Application`."><title>IntoBoot in cosmic::iced::application - 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 trait"><!--[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="#">Into<wbr>Boot</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.into_boot" title="into_boot">into_boot</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-IntoBoot%3CState,+Message%3E-for-(State,+Task%3CMessage%3E)" title="(State, Task&#60;Message&#62;)">(State, Task&#60;Message&#62;)</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>application</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">application</a></div><h1>Trait <span class="trait">IntoBoot</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 trait IntoBoot&lt;State, Message&gt; {
// Required method
fn <a href="#tymethod.into_boot" class="fn">into_boot</a>(self) -&gt; (State, <a class="struct" href="../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;Message&gt;);
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The initial state of some <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.into_boot" class="method"><h4 class="code-header">fn <a href="#tymethod.into_boot" class="fn">into_boot</a>(self) -&gt; (State, <a class="struct" href="../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;Message&gt;)</h4></section></summary><div class="docblock"><p>Turns some type into the initial state of some <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</p>
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-IntoBoot%3CState,+Message%3E-for-(State,+Task%3CMessage%3E)" class="impl"><a href="#impl-IntoBoot%3CState,+Message%3E-for-(State,+Task%3CMessage%3E)" class="anchor">§</a><h3 class="code-header">impl&lt;State, Message&gt; <a class="trait" href="trait.IntoBoot.html" title="trait cosmic::iced::application::IntoBoot">IntoBoot</a>&lt;State, Message&gt; for (State, <a class="struct" href="../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;Message&gt;)</h3></section></summary><div class="impl-items"><section id="method.into_boot" class="method trait-impl"><a href="#method.into_boot" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.into_boot" class="fn">into_boot</a>(self) -&gt; (State, <a class="struct" href="../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;Message&gt;)</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-IntoBoot%3CState,+Message%3E-for-State" class="impl"><a href="#impl-IntoBoot%3CState,+Message%3E-for-State" class="anchor">§</a><h3 class="code-header">impl&lt;State, Message&gt; <a class="trait" href="trait.IntoBoot.html" title="trait cosmic::iced::application::IntoBoot">IntoBoot</a>&lt;State, Message&gt; for State</h3></section></div><script src="../../../trait.impl/iced/application/trait.IntoBoot.js" data-ignore-extern-crates="std" async></script></section></div></main></body></html>

View file

@ -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="The theme logic of some `Application`."><title>ThemeFn in cosmic::iced::application - 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 trait"><!--[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="#">ThemeFn</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.theme" title="theme">theme</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>application</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">application</a></div><h1>Trait <span class="trait">ThemeFn</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 trait ThemeFn&lt;State, Theme&gt; {
// Required method
fn <a href="#tymethod.theme" class="fn">theme</a>(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;State</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Theme&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The theme logic of some <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</p>
<p>Any implementors of this trait can be provided as an argument to
<a href="../struct.Application.html#method.theme" title="method cosmic::iced::Application::theme"><code>Application::theme</code></a>.</p>
<p><code>iced</code> provides two implementors:</p>
<ul>
<li>the built-in <a href="../enum.Theme.html" title="enum cosmic::iced::Theme"><code>Theme</code></a> itself</li>
<li>and any <code>Fn(&amp;State) -&gt; impl Into&lt;Option&lt;Theme&gt;&gt;</code>.</li>
</ul>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.theme" class="method"><h4 class="code-header">fn <a href="#tymethod.theme" class="fn">theme</a>(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;State</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Theme&gt;</h4></section></summary><div class="docblock"><p>Returns the theme of the <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a> for the current state.</p>
<p>If <code>None</code> is returned, <code>iced</code> will try to use a theme that
matches the system color scheme.</p>
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-ThemeFn%3CState,+Theme%3E-for-F" class="impl"><a href="#impl-ThemeFn%3CState,+Theme%3E-for-F" class="anchor">§</a><h3 class="code-header">impl&lt;F, T, State, Theme&gt; <a class="trait" href="trait.ThemeFn.html" title="trait cosmic::iced::application::ThemeFn">ThemeFn</a>&lt;State, Theme&gt; for F<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;State</a>) -&gt; T,
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Theme&gt;&gt;,</div></h3></section><section id="impl-ThemeFn%3CState,+Theme%3E-for-Theme" class="impl"><a href="#impl-ThemeFn%3CState,+Theme%3E-for-Theme" class="anchor">§</a><h3 class="code-header">impl&lt;State&gt; <a class="trait" href="trait.ThemeFn.html" title="trait cosmic::iced::application::ThemeFn">ThemeFn</a>&lt;State, <a class="enum" href="../enum.Theme.html" title="enum cosmic::iced::Theme">Theme</a>&gt; for <a class="enum" href="../enum.Theme.html" title="enum cosmic::iced::Theme">Theme</a></h3></section></div><script src="../../../trait.impl/iced/application/trait.ThemeFn.js" data-ignore-extern-crates="iced_core" async></script></section></div></main></body></html>

View file

@ -0,0 +1,10 @@
<!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 title logic of some `Application`."><title>TitleFn in cosmic::iced::application - 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 trait"><!--[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="#">TitleFn</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.title" title="title">title</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-TitleFn%3CState%3E-for-%26str" title="&#38;&#39;static str">&#38;&#39;static str</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>application</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">application</a></div><h1>Trait <span class="trait">TitleFn</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 trait TitleFn&lt;State&gt; {
// Required method
fn <a href="#tymethod.title" class="fn">title</a>(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;State</a>) -&gt; <a class="struct" href="../../cctk/sctk/reexports/client/backend/smallvec/alloc/string/struct.String.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::string::String">String</a>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The title logic of some <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</p>
<p>This trait is implemented both for <code>&amp;static str</code> and
any closure <code>Fn(&amp;State) -&gt; String</code>.</p>
<p>This trait allows the <a href="../fn.application.html" title="fn cosmic::iced::application"><code>application</code></a> builder to take any of them.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.title" class="method"><h4 class="code-header">fn <a href="#tymethod.title" class="fn">title</a>(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;State</a>) -&gt; <a class="struct" href="../../cctk/sctk/reexports/client/backend/smallvec/alloc/string/struct.String.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Produces the title of the <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</p>
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-TitleFn%3CState%3E-for-%26str" class="impl"><a href="#impl-TitleFn%3CState%3E-for-%26str" class="anchor">§</a><h3 class="code-header">impl&lt;State&gt; <a class="trait" href="trait.TitleFn.html" title="trait cosmic::iced::application::TitleFn">TitleFn</a>&lt;State&gt; for &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><section id="method.title" class="method trait-impl"><a href="#method.title" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.title" class="fn">title</a>(&amp;self, _state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;State</a>) -&gt; <a class="struct" href="../../cctk/sctk/reexports/client/backend/smallvec/alloc/string/struct.String.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::string::String">String</a></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-TitleFn%3CState%3E-for-T" class="impl"><a href="#impl-TitleFn%3CState%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, State&gt; <a class="trait" href="trait.TitleFn.html" title="trait cosmic::iced::application::TitleFn">TitleFn</a>&lt;State&gt; for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;State</a>) -&gt; <a class="struct" href="../../cctk/sctk/reexports/client/backend/smallvec/alloc/string/struct.String.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::string::String">String</a>,</div></h3></section></div><script src="../../../trait.impl/iced/application/trait.TitleFn.js" data-ignore-extern-crates="std" async></script></section></div></main></body></html>

View file

@ -0,0 +1,10 @@
<!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 update logic of some `Application`."><title>UpdateFn in cosmic::iced::application - 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 trait"><!--[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="#">Update<wbr>Fn</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.update" title="update">update</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-UpdateFn%3CState,+Never%3E-for-()" title="()">()</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>application</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">application</a></div><h1>Trait <span class="trait">UpdateFn</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 trait UpdateFn&lt;State, Message&gt; {
// Required method
fn <a href="#tymethod.update" class="fn">update</a>(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut State</a>, message: Message) -&gt; <a class="struct" href="../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;Message&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The update logic of some <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</p>
<p>This trait allows the <a href="../fn.application.html" title="fn cosmic::iced::application"><code>application</code></a> builder to take any closure that
returns any <code>Into&lt;Task&lt;Message&gt;&gt;</code>.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.update" class="method"><h4 class="code-header">fn <a href="#tymethod.update" class="fn">update</a>(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut State</a>, message: Message) -&gt; <a class="struct" href="../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;Message&gt;</h4></section></summary><div class="docblock"><p>Processes the message and updates the state of the <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</p>
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-UpdateFn%3CState,+Never%3E-for-()" class="impl"><a href="#impl-UpdateFn%3CState,+Never%3E-for-()" class="anchor">§</a><h3 class="code-header">impl&lt;State&gt; <a class="trait" href="trait.UpdateFn.html" title="trait cosmic::iced::application::UpdateFn">UpdateFn</a>&lt;State, <a class="enum" href="../enum.Never.html" title="enum cosmic::iced::Never">Infallible</a>&gt; for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h3></section></summary><div class="impl-items"><section id="method.update" class="method trait-impl"><a href="#method.update" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.update" class="fn">update</a>(&amp;self, _state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut State</a>, _message: <a class="enum" href="../enum.Never.html" title="enum cosmic::iced::Never">Infallible</a>) -&gt; <a class="struct" href="../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;<a class="enum" href="../enum.Never.html" title="enum cosmic::iced::Never">Infallible</a>&gt;</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-UpdateFn%3CState,+Message%3E-for-T" class="impl"><a href="#impl-UpdateFn%3CState,+Message%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, State, Message, C&gt; <a class="trait" href="trait.UpdateFn.html" title="trait cosmic::iced::application::UpdateFn">UpdateFn</a>&lt;State, Message&gt; for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut State</a>, Message) -&gt; C,
C: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../../struct.Task.html" title="struct cosmic::Task">Task</a>&lt;Message&gt;&gt;,</div></h3></section></div><script src="../../../trait.impl/iced/application/trait.UpdateFn.js" data-ignore-extern-crates="std" async></script></section></div></main></body></html>

View file

@ -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="The view logic of some `Application`."><title>ViewFn in cosmic::iced::application - 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 trait"><!--[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="#">ViewFn</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.view" title="view">view</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>application</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">application</a></div><h1>Trait <span class="trait">ViewFn</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 trait ViewFn&lt;'a, State, Message, Theme, Renderer&gt; {
// Required method
fn <a href="#tymethod.view" class="fn">view</a>(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a State</a>) -&gt; <a class="struct" href="../daemon/program/graphics/core/struct.Element.html" title="struct cosmic::iced::daemon::program::graphics::core::Element">Element</a>&lt;'a, Message, Theme, Renderer&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The view logic of some <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</p>
<p>This trait allows the <a href="../fn.application.html" title="fn cosmic::iced::application"><code>application</code></a> builder to take any closure that
returns any <code>Into&lt;Element&lt;'_, Message&gt;&gt;</code>.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.view" class="method"><h4 class="code-header">fn <a href="#tymethod.view" class="fn">view</a>(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a State</a>) -&gt; <a class="struct" href="../daemon/program/graphics/core/struct.Element.html" title="struct cosmic::iced::daemon::program::graphics::core::Element">Element</a>&lt;'a, Message, Theme, Renderer&gt;</h4></section></summary><div class="docblock"><p>Produces the widget of the <a href="../struct.Application.html" title="struct cosmic::iced::Application"><code>Application</code></a>.</p>
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-ViewFn%3C'a,+State,+Message,+Theme,+Renderer%3E-for-T" class="impl"><a href="#impl-ViewFn%3C'a,+State,+Message,+Theme,+Renderer%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T, State, Message, Theme, Renderer, Widget&gt; <a class="trait" href="trait.ViewFn.html" title="trait cosmic::iced::application::ViewFn">ViewFn</a>&lt;'a, State, Message, Theme, Renderer&gt; for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a State</a>) -&gt; Widget,
State: 'static,
Widget: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../daemon/program/graphics/core/struct.Element.html" title="struct cosmic::iced::daemon::program::graphics::core::Element">Element</a>&lt;'a, Message, Theme, Renderer&gt;&gt;,</div></h3></section></div><script src="../../../trait.impl/iced/application/trait.ViewFn.js" async></script></section></div></main></body></html>