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

File diff suppressed because one or more lines are too long

View file

@ -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="Create a new asynchronous channel"><title>channel in cosmic::cctk::sctk::reexports::calloop::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="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>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop::<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">cctk</a>::<wbr><a href="../../../index.html">sctk</a>::<wbr><a href="../../index.html">reexports</a>::<wbr><a href="../index.html">calloop</a>::<wbr><a href="index.html">channel</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&lt;T&gt;() -&gt; (<a class="struct" href="struct.Sender.html" title="struct cosmic::cctk::sctk::reexports::calloop::channel::Sender">Sender</a>&lt;T&gt;, <a class="struct" href="struct.Channel.html" title="struct cosmic::cctk::sctk::reexports::calloop::channel::Channel">Channel</a>&lt;T&gt;)</code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create a new asynchronous channel</p>
</div></details></section></div></main></body></html>

View file

@ -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="Create a new synchronous, bounded channel"><title>sync_channel in cosmic::cctk::sctk::reexports::calloop::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="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>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop::<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">cctk</a>::<wbr><a href="../../../index.html">sctk</a>::<wbr><a href="../../index.html">reexports</a>::<wbr><a href="../index.html">calloop</a>::<wbr><a href="index.html">channel</a></div><h1>Function <span class="fn">sync_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 sync_channel&lt;T&gt;(bound: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; (<a class="struct" href="struct.SyncSender.html" title="struct cosmic::cctk::sctk::reexports::calloop::channel::SyncSender">SyncSender</a>&lt;T&gt;, <a class="struct" href="struct.Channel.html" title="struct cosmic::cctk::sctk::reexports::calloop::channel::Channel">Channel</a>&lt;T&gt;)</code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create a new synchronous, bounded channel</p>
</div></details></section></div></main></body></html>

View file

@ -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="An MPSC channel whose receiving end is an event source"><title>cosmic::cctk::sctk::reexports::calloop::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="../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 channel</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="#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>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop</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">cctk</a>::<wbr><a href="../../../index.html">sctk</a>::<wbr><a href="../../index.html">reexports</a>::<wbr><a href="../index.html">calloop</a></div><h1>Module <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><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An MPSC channel whose receiving end is an event source</p>
<p>Create a channel using <a href="fn.channel.html" title="fn cosmic::cctk::sctk::reexports::calloop::channel::channel"><code>channel()</code></a>, which returns a
<a href="struct.Sender.html" title="struct cosmic::cctk::sctk::reexports::calloop::channel::Sender"><code>Sender</code></a> that can be cloned and sent accross threads if <code>T: Send</code>,
and a <a href="struct.Channel.html" title="struct cosmic::cctk::sctk::reexports::calloop::channel::Channel"><code>Channel</code></a> that can be inserted into an <a href="../struct.EventLoop.html" title="struct cosmic::cctk::sctk::reexports::calloop::EventLoop"><code>EventLoop</code></a>.
It will generate one event per message.</p>
<p>A synchronous version of the channel is provided by <a href="fn.sync_channel.html" title="fn cosmic::cctk::sctk::reexports::calloop::channel::sync_channel"><code>sync_channel</code></a>, in which
the <a href="struct.SyncSender.html" title="struct cosmic::cctk::sctk::reexports::calloop::channel::SyncSender"><code>SyncSender</code></a> will block when the channel is full.</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.Channel.html" title="struct cosmic::cctk::sctk::reexports::calloop::channel::Channel">Channel</a></dt><dd>The receiving end of the channel</dd><dt><a class="struct" href="struct.ChannelError.html" title="struct cosmic::cctk::sctk::reexports::calloop::channel::ChannelError">Channel<wbr>Error</a></dt><dd>An error arising from processing events for a channel.</dd><dt><a class="struct" href="struct.Sender.html" title="struct cosmic::cctk::sctk::reexports::calloop::channel::Sender">Sender</a></dt><dd>The sender end of a channel</dd><dt><a class="struct" href="struct.SyncSender.html" title="struct cosmic::cctk::sctk::reexports::calloop::channel::SyncSender">Sync<wbr>Sender</a></dt><dd>The sender end of a synchronous 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.Event.html" title="enum cosmic::cctk::sctk::reexports::calloop::channel::Event">Event</a></dt><dd>The events generated by the channel event source</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::cctk::sctk::reexports::calloop::channel::channel">channel</a></dt><dd>Create a new asynchronous channel</dd><dt><a class="fn" href="fn.sync_channel.html" title="fn cosmic::cctk::sctk::reexports::calloop::channel::sync_channel">sync_<wbr>channel</a></dt><dd>Create a new synchronous, bounded channel</dd></dl></section></div></main></body></html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["Event"],"fn":["channel","sync_channel"],"struct":["Channel","ChannelError","Sender","SyncSender"]};

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

View file

@ -0,0 +1,19 @@
<!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="Error types used and generated by Calloop."><title>cosmic::cctk::sctk::reexports::calloop::error - 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 error</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="#enums" title="Enums">Enums</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>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop</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">cctk</a>::<wbr><a href="../../../index.html">sctk</a>::<wbr><a href="../../index.html">reexports</a>::<wbr><a href="../index.html">calloop</a></div><h1>Module <span>error</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><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Error types used and generated by Calloop.</p>
<p>This module contains error types for Calloop’s operations. They are designed
to make it easy to deal with errors arising from Calloop’s internal I/O and
other operations.</p>
<p>There are two top-level error types:</p>
<ul>
<li>
<p><a href="../enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error"><code>Error</code></a>: used by callback functions, internal operations, and some event
loop API calls</p>
</li>
<li>
<p><a href="../struct.InsertError.html" title="struct cosmic::cctk::sctk::reexports::calloop::InsertError"><code>InsertError</code></a>: used primarily by the <a href="../struct.LoopHandle.html#method.insert_source" title="method cosmic::cctk::sctk::reexports::calloop::LoopHandle::insert_source"><code>insert_source()</code></a> method when an
event source cannot be added to the loop and needs to be given back to the
caller</p>
</li>
</ul>
</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.InsertError.html" title="struct cosmic::cctk::sctk::reexports::calloop::error::InsertError">Insert<wbr>Error</a></dt><dd>An error generated when trying to insert an event source</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.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::error::Error">Error</a></dt><dd>The primary error type used by Calloop covering internal errors and I/O
errors that arise during loop operations such as source registration or
event dispatching.</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.Result.html" title="type cosmic::cctk::sctk::reexports::calloop::error::Result">Result</a></dt><dd><a href="../type.Result.html" title="type cosmic::cctk::sctk::reexports::calloop::Result"><code>Result</code></a> alias using Calloop’s error type.</dd></dl></section></div></main></body></html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["Error"],"struct":["InsertError"],"type":["Result"]};

File diff suppressed because one or more lines are too long

View file

@ -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="`Result` alias using Calloop’s error type."><title>Result in cosmic::cctk::sctk::reexports::calloop::error - 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="#">Result</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.Err" title="Err">Err</a></li><li><a href="#variant.Ok" title="Ok">Ok</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop::<wbr>error</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">cctk</a>::<wbr><a href="../../../index.html">sctk</a>::<wbr><a href="../../index.html">reexports</a>::<wbr><a href="../index.html">calloop</a>::<wbr><a href="index.html">error</a></div><h1>Type Alias <span class="type">Result</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 Result&lt;T&gt; = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, <a class="enum" href="../enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt;;</code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p><a href="../type.Result.html" title="type cosmic::cctk::sctk::reexports::calloop::Result"><code>Result</code></a> alias using Calloop’s error type.</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 enum Result&lt;T&gt; {
Ok(T),
Err(<a class="enum" href="../enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>),
}</code></pre><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.Ok" class="variant"><a href="#variant.Ok" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Ok(T)</h3></section><div class="docblock"><p>Contains the success value</p>
</div><section id="variant.Err" class="variant"><a href="#variant.Err" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Err(<a class="enum" href="../enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>)</h3></section><div class="docblock"><p>Contains the error value</p>
</div></div><script src="../../../../../../type.impl/core/result/enum.Result.js" data-self-path="cosmic::cctk::sctk::reexports::calloop::Result" async></script></section></div></main></body></html>

View file

@ -0,0 +1,27 @@
<!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 generic event source wrapping an IO objects or file descriptor"><title>cosmic::cctk::sctk::reexports::calloop::generic - 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 generic</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop</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">cctk</a>::<wbr><a href="../../../index.html">sctk</a>::<wbr><a href="../../index.html">reexports</a>::<wbr><a href="../index.html">calloop</a></div><h1>Module <span>generic</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><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A generic event source wrapping an IO objects or file descriptor</p>
<p>You can use this general purpose adapter around file-descriptor backed objects to
insert into an <a href="../struct.EventLoop.html" title="struct cosmic::cctk::sctk::reexports::calloop::EventLoop"><code>EventLoop</code></a>.</p>
<p>The event generated by this <a href="struct.Generic.html" title="struct cosmic::cctk::sctk::reexports::calloop::generic::Generic"><code>Generic</code></a> event source are the <a href="../struct.Readiness.html" title="struct cosmic::cctk::sctk::reexports::calloop::Readiness"><code>Readiness</code></a>
notification itself, and the monitored object is provided to your callback as the second
argument.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>calloop::{generic::Generic, Interest, Mode, PostAction};
handle.insert_source(
<span class="comment">// wrap your IO object in a Generic, here we register for read readiness
// in level-triggering mode
</span>Generic::new(io_object, Interest::READ, Mode::Level),
|readiness, io_object, shared_data| {
<span class="comment">// The first argument of the callback is a Readiness
// The second is a &amp;mut reference to your object
// your callback needs to return a Result&lt;PostAction, std::io::Error&gt;
// if it returns an error, the event loop will consider this event
// event source as erroring and report it to the user.
</span><span class="prelude-val">Ok</span>(PostAction::Continue)
}
);</code></pre></div>
<p>It can also help you implementing your own event sources: just have
these <code>Generic&lt;_&gt;</code> as fields of your event source, and delegate the
<a href="../trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource"><code>EventSource</code></a> implementation to them.</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.FdWrapper.html" title="struct cosmic::cctk::sctk::reexports::calloop::generic::FdWrapper">FdWrapper</a></dt><dd>Wrapper to use a type implementing <code>AsRawFd</code> but not <code>AsFd</code> with <code>Generic</code></dd><dt><a class="struct" href="struct.Generic.html" title="struct cosmic::cctk::sctk::reexports::calloop::generic::Generic">Generic</a></dt><dd>A generic event source wrapping a FD-backed type</dd><dt><a class="struct" href="struct.NoIoDrop.html" title="struct cosmic::cctk::sctk::reexports::calloop::generic::NoIoDrop">NoIo<wbr>Drop</a></dt><dd>A wrapper around a type that doesn’t expose it mutably safely.</dd></dl></section></div></main></body></html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["FdWrapper","Generic","NoIoDrop"]};

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

View file

@ -0,0 +1,130 @@
<!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="Calloop, a Callback-based Event Loop"><title>cosmic::cctk::sctk::reexports::calloop - 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="#">Sections</a></h3><ul class="block top-toc"><li><a href="#how-to-use-it" title="How to use it">How to use it</a></li><li><a href="#event-source-types" title="Event source types">Event source types</a></li><li><a href="#asyncawait-compatibility" title="Async/Await compatibility">Async/Await compatibility</a></li><li><a href="#custom-event-sources" title="Custom event sources">Custom event sources</a></li><li><a href="#platforms-support" title="Platforms support">Platforms support</a></li></ul><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="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</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>cctk::<wbr>sctk::<wbr>reexports</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">cctk</a>::<wbr><a href="../../index.html">sctk</a>::<wbr><a href="../index.html">reexports</a></div><h1>Crate <span>calloop</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><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Calloop, a Callback-based Event Loop</p>
<p>This crate provides an <a href="struct.EventLoop.html" title="struct cosmic::cctk::sctk::reexports::calloop::EventLoop"><code>EventLoop</code></a> type, which is a small abstraction
over a polling system. The main difference between this crate
and other traditional rust event loops is that it is based on callbacks:
you can register several event sources, each being associated with a callback
closure that will be invoked whenever the associated event source generates
events.</p>
<p>The main target use of this event loop is thus for apps that expect to spend
most of their time waiting for events and wishes to do so in a cheap and convenient
way. It is not meant for large scale high performance IO.</p>
<h3 id="how-to-use-it"><a class="doc-anchor" href="#how-to-use-it">§</a>How to use it</h3>
<p>Below is a quick usage example of calloop. For a more in-depth tutorial, see
the <a href="https://smithay.github.io/calloop">calloop book</a>.</p>
<p>For simple uses, you can just add event sources with callbacks to the event
loop. For example, here’s a runnable program that exits after five seconds:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>calloop::{timer::{Timer, TimeoutAction}, EventLoop, LoopSignal};
<span class="kw">fn </span>main() {
<span class="comment">// Create the event loop. The loop is parameterised by the kind of shared
// data you want the callbacks to use. In this case, we want to be able to
// stop the loop when the timer fires, so we provide the loop with a
// LoopSignal, which has the ability to stop the loop from within events. We
// just annotate the type here; the actual data is provided later in the
// run() call.
</span><span class="kw">let </span><span class="kw-2">mut </span>event_loop: EventLoop&lt;LoopSignal&gt; =
EventLoop::try_new().expect(<span class="string">"Failed to initialize the event loop!"</span>);
<span class="comment">// Retrieve a handle. It is used to insert new sources into the event loop
// It can be cloned, allowing you to insert sources from within source
// callbacks.
</span><span class="kw">let </span>handle = event_loop.handle();
<span class="comment">// Create our event source, a timer, that will expire in 2 seconds
</span><span class="kw">let </span>source = Timer::from_duration(std::time::Duration::from_secs(<span class="number">2</span>));
<span class="comment">// Inserting an event source takes this general form. It can also be done
// from within the callback of another event source.
</span>handle
.insert_source(
<span class="comment">// a type which implements the EventSource trait
</span>source,
<span class="comment">// a callback that is invoked whenever this source generates an event
</span>|event, _metadata, shared_data| {
<span class="comment">// This callback is given 3 values:
// - the event generated by the source (in our case, timer events are the Instant
// representing the deadline for which it has fired)
// - &amp;mut access to some metadata, specific to the event source (in our case, a
// timer handle)
// - &amp;mut access to the global shared data that was passed to EventLoop::run or
// EventLoop::dispatch (in our case, a LoopSignal object to stop the loop)
//
// The return type is just () because nothing uses it. Some
// sources will expect a Result of some kind instead.
</span><span class="macro">println!</span>(<span class="string">"Timeout for {:?} expired!"</span>, event);
<span class="comment">// notify the event loop to stop running using the signal in the shared data
// (see below)
</span>shared_data.stop();
<span class="comment">// The timer event source requires us to return a TimeoutAction to
// specify if the timer should be rescheduled. In our case we just drop it.
</span>TimeoutAction::Drop
},
)
.expect(<span class="string">"Failed to insert event source!"</span>);
<span class="comment">// Create the shared data for our loop.
</span><span class="kw">let </span><span class="kw-2">mut </span>shared_data = event_loop.get_signal();
<span class="comment">// Actually run the event loop. This will dispatch received events to their
// callbacks, waiting at most 20ms for new events between each invocation of
// the provided callback (pass None for the timeout argument if you want to
// wait indefinitely between events).
//
// This is where we pass the *value* of the shared data, as a mutable
// reference that will be forwarded to all your callbacks, allowing them to
// share some state
</span>event_loop
.run(
std::time::Duration::from_millis(<span class="number">20</span>),
<span class="kw-2">&amp;mut </span>shared_data,
|_shared_data| {
<span class="comment">// Finally, this is where you can insert the processing you need
// to do do between each waiting event eg. drawing logic if
// you're doing a GUI app.
</span>},
)
.expect(<span class="string">"Error during event loop!"</span>);
}</code></pre></div>
<h3 id="event-source-types"><a class="doc-anchor" href="#event-source-types">§</a>Event source types</h3>
<p>The event loop is backed by an OS provided polling selector (epoll on Linux).</p>
<p>This crate also provide some adapters for common event sources such as:</p>
<ul>
<li><a href="channel/index.html" title="mod cosmic::cctk::sctk::reexports::calloop::channel">MPSC channels</a></li>
<li><a href="timer/index.html" title="mod cosmic::cctk::sctk::reexports::calloop::timer">Timers</a></li>
<li><a href="signals">unix signals</a> on Linux</li>
</ul>
<p>As well as generic objects backed by file descriptors.</p>
<p>It is also possible to insert “idle” callbacks. These callbacks represent computations that
need to be done at some point, but are not as urgent as processing the events. These callbacks
are stored and then executed during <a href="struct.EventLoop.html#method.dispatch" title="struct cosmic::cctk::sctk::reexports::calloop::EventLoop"><code>EventLoop::dispatch</code></a>, once all
events from the sources have been processed.</p>
<h3 id="asyncawait-compatibility"><a class="doc-anchor" href="#asyncawait-compatibility">§</a>Async/Await compatibility</h3>
<p><code>calloop</code> can be used with futures, both as an executor and for monitoring Async IO.</p>
<p>Activating the <code>executor</code> cargo feature will add the [<code>futures</code>] module, which provides
a future executor that can be inserted into an <a href="struct.EventLoop.html" title="struct cosmic::cctk::sctk::reexports::calloop::EventLoop"><code>EventLoop</code></a> as yet another <a href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource"><code>EventSource</code></a>.</p>
<p>IO objects can be made Async-aware via the <a href="struct.LoopHandle.html#method.adapt_io" title="struct cosmic::cctk::sctk::reexports::calloop::LoopHandle"><code>LoopHandle::adapt_io</code></a>
method. Waking up the futures using these objects is handled by the associated <a href="struct.EventLoop.html" title="struct cosmic::cctk::sctk::reexports::calloop::EventLoop"><code>EventLoop</code></a>
directly.</p>
<h3 id="custom-event-sources"><a class="doc-anchor" href="#custom-event-sources">§</a>Custom event sources</h3>
<p>You can create custom event sources can will be inserted in the event loop by
implementing the <a href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource"><code>EventSource</code></a> trait. This can be done either directly from the file
descriptors of your source of interest, or by wrapping an other event source and further
processing its events. An <a href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource"><code>EventSource</code></a> can register more than one file descriptor and
aggregate them.</p>
<h3 id="platforms-support"><a class="doc-anchor" href="#platforms-support">§</a>Platforms support</h3>
<p>Currently, calloop is tested on Linux, FreeBSD and macOS.</p>
<p>The following platforms are also enabled at compile time but not tested: Android, NetBSD,
OpenBSD, DragonFlyBSD.</p>
<p>Those platforms <em>should</em> work based on the fact that they have the same polling mechanism as
tested platforms, but some subtle bugs might still occur.</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::cctk::sctk::reexports::calloop::channel">channel</a></dt><dd>An MPSC channel whose receiving end is an event source</dd><dt><a class="mod" href="error/index.html" title="mod cosmic::cctk::sctk::reexports::calloop::error">error</a></dt><dd>Error types used and generated by Calloop.</dd><dt><a class="mod" href="generic/index.html" title="mod cosmic::cctk::sctk::reexports::calloop::generic">generic</a></dt><dd>A generic event source wrapping an IO objects or file descriptor</dd><dt><a class="mod" href="io/index.html" title="mod cosmic::cctk::sctk::reexports::calloop::io">io</a></dt><dd>Adapters for async IO objects</dd><dt><a class="mod" href="ping/index.html" title="mod cosmic::cctk::sctk::reexports::calloop::ping">ping</a></dt><dd>Ping to the event loop</dd><dt><a class="mod" href="timer/index.html" title="mod cosmic::cctk::sctk::reexports::calloop::timer">timer</a></dt><dd>Timer event source</dd><dt><a class="mod" href="transient/index.html" title="mod cosmic::cctk::sctk::reexports::calloop::transient">transient</a></dt><dd>Wrapper for a transient Calloop event source.</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.batch_register.html" title="macro cosmic::cctk::sctk::reexports::calloop::batch_register">batch_<wbr>register</a></dt><dd>Register a set of event sources. Effectively calls
<a href="trait.EventSource.html#tymethod.register" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::register"><code>EventSource::register()</code></a> for all the sources provided.</dd><dt><a class="macro" href="macro.batch_reregister.html" title="macro cosmic::cctk::sctk::reexports::calloop::batch_reregister">batch_<wbr>reregister</a></dt><dd>Reregister a set of event sources. Effectively calls
<a href="trait.EventSource.html#tymethod.reregister" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::reregister"><code>EventSource::reregister()</code></a> for all the sources provided.</dd><dt><a class="macro" href="macro.batch_unregister.html" title="macro cosmic::cctk::sctk::reexports::calloop::batch_unregister">batch_<wbr>unregister</a></dt><dd>Unregister a set of event sources. Effectively calls
<a href="trait.EventSource.html#tymethod.unregister" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::unregister"><code>EventSource::unregister()</code></a> for all the sources provided.</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.Dispatcher.html" title="struct cosmic::cctk::sctk::reexports::calloop::Dispatcher">Dispatcher</a></dt><dd>An event source with its callback.</dd><dt><a class="struct" href="struct.EventIterator.html" title="struct cosmic::cctk::sctk::reexports::calloop::EventIterator">Event<wbr>Iterator</a></dt><dd>The EventIterator is an <code>Iterator</code> over the events relevant to a particular source
This type is used in the <a href="trait.EventSource.html#method.before_handle_events" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::before_handle_events"><code>EventSource::before_handle_events</code></a> methods for
two main reasons:</dd><dt><a class="struct" href="struct.EventLoop.html" title="struct cosmic::cctk::sctk::reexports::calloop::EventLoop">Event<wbr>Loop</a></dt><dd>An event loop</dd><dt><a class="struct" href="struct.Idle.html" title="struct cosmic::cctk::sctk::reexports::calloop::Idle">Idle</a></dt><dd>An idle callback that was inserted in this loop</dd><dt><a class="struct" href="struct.InsertError.html" title="struct cosmic::cctk::sctk::reexports::calloop::InsertError">Insert<wbr>Error</a></dt><dd>An error generated when trying to insert an event source</dd><dt><a class="struct" href="struct.Interest.html" title="struct cosmic::cctk::sctk::reexports::calloop::Interest">Interest</a></dt><dd>Interest to register regarding the file descriptor</dd><dt><a class="struct" href="struct.LoopHandle.html" title="struct cosmic::cctk::sctk::reexports::calloop::LoopHandle">Loop<wbr>Handle</a></dt><dd>A handle to an event loop</dd><dt><a class="struct" href="struct.LoopSignal.html" title="struct cosmic::cctk::sctk::reexports::calloop::LoopSignal">Loop<wbr>Signal</a></dt><dd>A signal that can be shared between thread to stop or wakeup a running
event loop</dd><dt><a class="struct" href="struct.Poll.html" title="struct cosmic::cctk::sctk::reexports::calloop::Poll">Poll</a></dt><dd>The polling system</dd><dt><a class="struct" href="struct.Readiness.html" title="struct cosmic::cctk::sctk::reexports::calloop::Readiness">Readiness</a></dt><dd>Readiness for a file descriptor notification</dd><dt><a class="struct" href="struct.RegistrationToken.html" title="struct cosmic::cctk::sctk::reexports::calloop::RegistrationToken">Registration<wbr>Token</a></dt><dd>A token representing a registration in the <a href="struct.EventLoop.html" title="struct cosmic::cctk::sctk::reexports::calloop::EventLoop"><code>EventLoop</code></a>.</dd><dt><a class="struct" href="struct.Token.html" title="struct cosmic::cctk::sctk::reexports::calloop::Token">Token</a></dt><dd>A token (for implementation of the <a href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource"><code>EventSource</code></a> trait)</dd><dt><a class="struct" href="struct.TokenFactory.html" title="struct cosmic::cctk::sctk::reexports::calloop::TokenFactory">Token<wbr>Factory</a></dt><dd>Factory for creating tokens in your registrations</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.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a></dt><dd>The primary error type used by Calloop covering internal errors and I/O
errors that arise during loop operations such as source registration or
event dispatching.</dd><dt><a class="enum" href="enum.Mode.html" title="enum cosmic::cctk::sctk::reexports::calloop::Mode">Mode</a></dt><dd>Possible modes for registering a file descriptor</dd><dt><a class="enum" href="enum.PostAction.html" title="enum cosmic::cctk::sctk::reexports::calloop::PostAction">Post<wbr>Action</a></dt><dd>Possible actions that can be requested to the event loop by an
event source once its events have been processed.</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.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">Event<wbr>Source</a></dt><dd>Trait representing an event source</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.Result.html" title="type cosmic::cctk::sctk::reexports::calloop::Result">Result</a></dt><dd><a href="type.Result.html" title="type cosmic::cctk::sctk::reexports::calloop::Result"><code>Result</code></a> alias using Calloop’s error type.</dd></dl></section></div></main></body></html>

View file

@ -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="Adapters for async IO objects"><title>cosmic::cctk::sctk::reexports::calloop::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 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 io</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop</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">cctk</a>::<wbr><a href="../../../index.html">sctk</a>::<wbr><a href="../../index.html">reexports</a>::<wbr><a href="../index.html">calloop</a></div><h1>Module <span>io</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><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Adapters for async IO objects</p>
<p>This module mainly hosts the <a href="struct.Async.html" title="struct cosmic::cctk::sctk::reexports::calloop::io::Async"><code>Async</code></a> adapter for making IO objects async with readiness
monitoring backed by an <a href="../struct.EventLoop.html" title="struct cosmic::cctk::sctk::reexports::calloop::EventLoop"><code>EventLoop</code></a>. See <a href="../struct.LoopHandle.html#method.adapt_io" title="struct cosmic::cctk::sctk::reexports::calloop::LoopHandle"><code>LoopHandle::adapt_io</code></a> for
how to create them.</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.Async.html" title="struct cosmic::cctk::sctk::reexports::calloop::io::Async">Async</a></dt><dd>Adapter for async IO manipulations</dd><dt><a class="struct" href="struct.Readable.html" title="struct cosmic::cctk::sctk::reexports::calloop::io::Readable">Readable</a></dt><dd>A future that resolves once the associated object becomes ready for reading</dd><dt><a class="struct" href="struct.Writable.html" title="struct cosmic::cctk::sctk::reexports::calloop::io::Writable">Writable</a></dt><dd>A future that resolves once the associated object becomes ready for writing</dd></dl></section></div></main></body></html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["Async","Readable","Writable"]};

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

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=macro.batch_register.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="macro.batch_register.html">macro.batch_register.html</a>...</p>
<script>location.replace("macro.batch_register.html" + location.search + location.hash);</script>
</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="Register a set of event sources. Effectively calls `EventSource::register()` for all the sources provided."><title>batch_register in cosmic::cctk::sctk::reexports::calloop - 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 macro"><!--[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>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop</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">cctk</a>::<wbr><a href="../../index.html">sctk</a>::<wbr><a href="../index.html">reexports</a>::<wbr><a href="index.html">calloop</a></div><h1>Macro <span class="macro">batch_register</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>macro_rules! batch_register {
($poll:ident, $token_fac:ident, $( $source:expr ),* $(,)?) =&gt; { ... };
}</code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Register a set of event sources. Effectively calls
<a href="trait.EventSource.html#tymethod.register" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::register"><code>EventSource::register()</code></a> for all the sources provided.</p>
<p>Usage:</p>
<div class="example-wrap"><pre class="language-none"><code>calloop::batch_register!(
poll, token_factory,
self.source_one,
self.source_two,
self.source_three,
self.source_four,
)</code></pre></div>
<p>Note that there is no scope for customisation; if you need to do special
things with a particular source, you’ll need to leave it off the list. Also
note that this only does try-or-early-return error handling in the order
that you list the sources; if you need anything else, don’t use this macro.</p>
</div></details></section></div></main></body></html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=macro.batch_reregister.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="macro.batch_reregister.html">macro.batch_reregister.html</a>...</p>
<script>location.replace("macro.batch_reregister.html" + location.search + location.hash);</script>
</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="Reregister a set of event sources. Effectively calls `EventSource::reregister()` for all the sources provided."><title>batch_reregister in cosmic::cctk::sctk::reexports::calloop - 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 macro"><!--[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>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop</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">cctk</a>::<wbr><a href="../../index.html">sctk</a>::<wbr><a href="../index.html">reexports</a>::<wbr><a href="index.html">calloop</a></div><h1>Macro <span class="macro">batch_reregister</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>macro_rules! batch_reregister {
($poll:ident, $token_fac:ident, $( $source:expr ),* $(,)?) =&gt; { ... };
}</code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Reregister a set of event sources. Effectively calls
<a href="trait.EventSource.html#tymethod.reregister" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::reregister"><code>EventSource::reregister()</code></a> for all the sources provided.</p>
<p>Usage:</p>
<div class="example-wrap"><pre class="language-none"><code>calloop::batch_reregister!(
poll, token_factory,
self.source_one,
self.source_two,
self.source_three,
self.source_four,
)</code></pre></div>
<p>Note that there is no scope for customisation; if you need to do special
things with a particular source, you’ll need to leave it off the list. Also
note that this only does try-or-early-return error handling in the order
that you list the sources; if you need anything else, don’t use this macro.</p>
</div></details></section></div></main></body></html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=macro.batch_unregister.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="macro.batch_unregister.html">macro.batch_unregister.html</a>...</p>
<script>location.replace("macro.batch_unregister.html" + location.search + location.hash);</script>
</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="Unregister a set of event sources. Effectively calls `EventSource::unregister()` for all the sources provided."><title>batch_unregister in cosmic::cctk::sctk::reexports::calloop - 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 macro"><!--[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>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop</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">cctk</a>::<wbr><a href="../../index.html">sctk</a>::<wbr><a href="../index.html">reexports</a>::<wbr><a href="index.html">calloop</a></div><h1>Macro <span class="macro">batch_unregister</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>macro_rules! batch_unregister {
($poll:ident, $( $source:expr ),* $(,)?) =&gt; { ... };
}</code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Unregister a set of event sources. Effectively calls
<a href="trait.EventSource.html#tymethod.unregister" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::unregister"><code>EventSource::unregister()</code></a> for all the sources provided.</p>
<p>Usage:</p>
<div class="example-wrap"><pre class="language-none"><code>calloop::batch_unregister!(
poll,
self.source_one,
self.source_two,
self.source_three,
self.source_four,
)</code></pre></div>
<p>Note that there is no scope for customisation; if you need to do special
things with a particular source, you’ll need to leave it off the list. Also
note that this only does try-or-early-return error handling in the order
that you list the sources; if you need anything else, don’t use this macro.</p>
</div></details></section></div></main></body></html>

View file

@ -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="Create a new ping event source"><title>make_ping in cosmic::cctk::sctk::reexports::calloop::ping - 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>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop::<wbr>ping</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">cctk</a>::<wbr><a href="../../../index.html">sctk</a>::<wbr><a href="../../index.html">reexports</a>::<wbr><a href="../index.html">calloop</a>::<wbr><a href="index.html">ping</a></div><h1>Function <span class="fn">make_ping</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 make_ping() -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Ping, PingSource), <a class="struct" href="../../../../../iced/daemon/program/graphics/futures/futures/io/struct.Error.html" title="struct cosmic::iced::daemon::program::graphics::futures::futures::io::Error">Error</a>&gt;</code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create a new ping event source</p>
<p>you are given a <a href="type.Ping.html" title="type cosmic::cctk::sctk::reexports::calloop::ping::Ping"><code>Ping</code></a> instance, which can be cloned and used to ping the
event loop, and a <a href="type.PingSource.html" title="type cosmic::cctk::sctk::reexports::calloop::ping::PingSource"><code>PingSource</code></a>, which you can insert in your event loop to
receive the pings.</p>
</div></details></section></div></main></body></html>

View file

@ -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="Ping to the event loop"><title>cosmic::cctk::sctk::reexports::calloop::ping - 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 ping</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><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>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop</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">cctk</a>::<wbr><a href="../../../index.html">sctk</a>::<wbr><a href="../../index.html">reexports</a>::<wbr><a href="../index.html">calloop</a></div><h1>Module <span>ping</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><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Ping to the event loop</p>
<p>This is an event source that just produces <code>()</code> events whevener the associated
<a href="type.Ping.html#method.ping" title="type cosmic::cctk::sctk::reexports::calloop::ping::Ping"><code>Ping::ping</code></a> method is called. If the event source is pinged multiple times
between a single dispatching, it’ll only generate one event.</p>
<p>This event source is a simple way of waking up the event loop from an other part of your program
(and is what backs the <a href="../struct.LoopSignal.html" title="struct cosmic::cctk::sctk::reexports::calloop::LoopSignal"><code>LoopSignal</code></a>). It can also be used as a building
block to construct event sources whose source of event is not file descriptor, but rather an
userspace source (like an other 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.PingError.html" title="struct cosmic::cctk::sctk::reexports::calloop::ping::PingError">Ping<wbr>Error</a></dt><dd>An error arising from processing events for a ping.</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.make_ping.html" title="fn cosmic::cctk::sctk::reexports::calloop::ping::make_ping">make_<wbr>ping</a></dt><dd>Create a new ping event source</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.Ping.html" title="type cosmic::cctk::sctk::reexports::calloop::ping::Ping">Ping</a></dt><dd>The ping event source</dd><dt><a class="type" href="type.PingSource.html" title="type cosmic::cctk::sctk::reexports::calloop::ping::PingSource">Ping<wbr>Source</a></dt><dd>The Ping handle</dd></dl></section></div></main></body></html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"fn":["make_ping"],"struct":["PingError"],"type":["Ping","PingSource"]};

File diff suppressed because one or more lines are too long

View file

@ -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="The ping event source"><title>Ping in cosmic::cctk::sctk::reexports::calloop::ping - 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="#">Ping</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop::<wbr>ping</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">cctk</a>::<wbr><a href="../../../index.html">sctk</a>::<wbr><a href="../../index.html">reexports</a>::<wbr><a href="../index.html">calloop</a>::<wbr><a href="index.html">ping</a></div><h1>Type Alias <span class="type">Ping</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 Ping = Ping;</code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The ping event source</p>
<p>You can insert it in your event loop to receive pings.</p>
<p>If you use it directly, it will automatically remove itself from the event loop
once all <a href="type.Ping.html" title="type cosmic::cctk::sctk::reexports::calloop::ping::Ping"><code>Ping</code></a> instances are dropped.</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 Ping { <span class="comment">/* private fields */</span> }</code></pre><script src="../../../../../../type.impl/calloop/sources/ping/eventfd/struct.Ping.js" data-self-path="cosmic::cctk::sctk::reexports::calloop::ping::Ping" async></script></section></div></main></body></html>

View file

@ -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="The Ping handle"><title>PingSource in cosmic::cctk::sctk::reexports::calloop::ping - 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="#">Ping<wbr>Source</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop::<wbr>ping</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">cctk</a>::<wbr><a href="../../../index.html">sctk</a>::<wbr><a href="../../index.html">reexports</a>::<wbr><a href="../index.html">calloop</a>::<wbr><a href="index.html">ping</a></div><h1>Type Alias <span class="type">PingSource</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 PingSource = PingSource;</code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The Ping handle</p>
<p>This handle can be cloned and sent accross threads. It can be used to
send pings to the <code>PingSource</code>.</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 PingSource { <span class="comment">/* private fields */</span> }</code></pre><script src="../../../../../../type.impl/calloop/sources/ping/eventfd/struct.PingSource.js" data-self-path="cosmic::cctk::sctk::reexports::calloop::ping::PingSource" async></script></section></div></main></body></html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["Error","Mode","PostAction"],"macro":["batch_register","batch_reregister","batch_unregister"],"mod":["channel","error","generic","io","ping","timer","transient"],"struct":["Dispatcher","EventIterator","EventLoop","Idle","InsertError","Interest","LoopHandle","LoopSignal","Poll","Readiness","RegistrationToken","Token","TokenFactory"],"trait":["EventSource"],"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

View file

@ -0,0 +1,15 @@
<!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="Timer event source"><title>cosmic::cctk::sctk::reexports::calloop::timer - 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 timer</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="#enums" title="Enums">Enums</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop</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">cctk</a>::<wbr><a href="../../../index.html">sctk</a>::<wbr><a href="../../index.html">reexports</a>::<wbr><a href="../index.html">calloop</a></div><h1>Module <span>timer</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><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Timer event source</p>
<p>The <a href="struct.Timer.html" title="struct cosmic::cctk::sctk::reexports::calloop::timer::Timer"><code>Timer</code></a> is an event source that will fire its event after a certain amount of time
specified at creation. Its timing is tracked directly by the event loop core logic, and it does
not consume any system resource.</p>
<p>As of calloop v0.11.0, the event loop always uses high-precision timers. However, the timer
precision varies between operating systems; for instance, the scheduler granularity on Windows
is about 16 milliseconds. If you need to rely on good precision timers in general, you may need
to enable realtime features of your OS to ensure your thread is quickly woken up by the system
scheduler.</p>
<p>The provided event is an <a href="../../../../../iced/time/struct.Instant.html" title="struct cosmic::iced::time::Instant"><code>Instant</code></a> representing the deadline for which this timer has fired
(which can be earlier than the current time depending on the event loop congestion).</p>
<p>The callback associated with this event source is expected to return a <a href="enum.TimeoutAction.html" title="enum cosmic::cctk::sctk::reexports::calloop::timer::TimeoutAction"><code>TimeoutAction</code></a>, which
can be used to implement self-repeating timers by telling calloop to reprogram the same timer
for a later timeout after it has fired.</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.TimeoutFuture.html" title="struct cosmic::cctk::sctk::reexports::calloop::timer::TimeoutFuture">Timeout<wbr>Future</a></dt><dd>A future that resolves once a certain timeout is expired</dd><dt><a class="struct" href="struct.Timer.html" title="struct cosmic::cctk::sctk::reexports::calloop::timer::Timer">Timer</a></dt><dd>A timer event source</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.TimeoutAction.html" title="enum cosmic::cctk::sctk::reexports::calloop::timer::TimeoutAction">Timeout<wbr>Action</a></dt><dd>Action to reschedule a timeout if necessary</dd></dl></section></div></main></body></html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["TimeoutAction"],"struct":["TimeoutFuture","Timer"]};

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

View file

@ -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="Wrapper for a transient Calloop event source."><title>cosmic::cctk::sctk::reexports::calloop::transient - 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 transient</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop</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">cctk</a>::<wbr><a href="../../../index.html">sctk</a>::<wbr><a href="../../index.html">reexports</a>::<wbr><a href="../index.html">calloop</a></div><h1>Module <span>transient</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><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Wrapper for a transient Calloop event source.</p>
<p>If you have high level event source that you expect to remain in the event
loop indefinitely, and another event source nested inside that one that you
expect to require removal or disabling from time to time, this module can
handle it for you.</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.TransientSource.html" title="struct cosmic::cctk::sctk::reexports::calloop::transient::TransientSource">Transient<wbr>Source</a></dt><dd>A <a href="struct.TransientSource.html" title="struct cosmic::cctk::sctk::reexports::calloop::transient::TransientSource"><code>TransientSource</code></a> wraps a Calloop event source and manages its
registration. A user of this type only needs to perform the usual Calloop
calls (<code>process_events()</code> and <code>*register()</code>) and the return value of
<a href="../trait.EventSource.html#tymethod.process_events" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::process_events"><code>process_events()</code></a>.</dd></dl></section></div></main></body></html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["TransientSource"]};

File diff suppressed because one or more lines are too long

View file

@ -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="`Result` alias using Calloop’s error type."><title>Result in cosmic::cctk::sctk::reexports::calloop - 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="#">Result</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.Err" title="Err">Err</a></li><li><a href="#variant.Ok" title="Ok">Ok</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>cctk::<wbr>sctk::<wbr>reexports::<wbr>calloop</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">cctk</a>::<wbr><a href="../../index.html">sctk</a>::<wbr><a href="../index.html">reexports</a>::<wbr><a href="index.html">calloop</a></div><h1>Type Alias <span class="type">Result</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 Result&lt;T&gt; = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt;;</code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p><a href="type.Result.html" title="type cosmic::cctk::sctk::reexports::calloop::Result"><code>Result</code></a> alias using Calloop’s error type.</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 enum Result&lt;T&gt; {
Ok(T),
Err(<a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>),
}</code></pre><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.Ok" class="variant"><a href="#variant.Ok" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Ok(T)</h3></section><div class="docblock"><p>Contains the success value</p>
</div><section id="variant.Err" class="variant"><a href="#variant.Err" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Err(<a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>)</h3></section><div class="docblock"><p>Contains the error value</p>
</div></div><script src="../../../../../type.impl/core/result/enum.Result.js" data-self-path="cosmic::cctk::sctk::reexports::calloop::Result" async></script></section></div></main></body></html>