17 lines
No EOL
5.7 KiB
HTML
17 lines
No EOL
5.7 KiB
HTML
<!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<State, Message, Theme, Renderer>(
|
|
boot: impl <a class="trait" href="trait.BootFn.html" title="trait cosmic::iced::application::BootFn">BootFn</a><State, Message>,
|
|
update: impl <a class="trait" href="timed/trait.UpdateFn.html" title="trait cosmic::iced::application::timed::UpdateFn">UpdateFn</a><State, Message>,
|
|
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">&State</a>) -> <a class="struct" href="../struct.Subscription.html" title="struct cosmic::iced::Subscription">Subscription</a><Message>,
|
|
view: impl for<'a> <a class="trait" href="trait.ViewFn.html" title="trait cosmic::iced::application::ViewFn">ViewFn</a><'a, State, Message, Theme, Renderer>,
|
|
) -> <a class="struct" href="../struct.Application.html" title="struct cosmic::iced::Application">Application</a><impl <a class="trait" href="../trait.Program.html" title="trait cosmic::iced::Program">Program</a><State = State, Message = (Message, <a class="struct" href="../time/struct.Instant.html" title="struct cosmic::iced::time::Instant">Instant</a>), Theme = Theme>><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> |