libcosmic/cosmic/cctk/sctk/reexports/calloop/trait.EventSource.html
2026-04-18 20:11:25 +00:00

140 lines
No EOL
57 KiB
HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Trait representing an event source"><title>EventSource 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 trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Event<wbr>Source</a></h2><h3><a href="#provided-associated-consts">Provided Associated Constants</a></h3><ul class="block"><li><a href="#associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS" title="NEEDS_EXTRA_LIFECYCLE_EVENTS">NEEDS_EXTRA_LIFECYCLE_EVENTS</a></li></ul><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Error" title="Error">Error</a></li><li><a href="#associatedtype.Event" title="Event">Event</a></li><li><a href="#associatedtype.Metadata" title="Metadata">Metadata</a></li><li><a href="#associatedtype.Ret" title="Ret">Ret</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.process_events" title="process_events">process_events</a></li><li><a href="#tymethod.register" title="register">register</a></li><li><a href="#tymethod.reregister" title="reregister">reregister</a></li><li><a href="#tymethod.unregister" title="unregister">unregister</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.before_handle_events" title="before_handle_events">before_handle_events</a></li><li><a href="#method.before_sleep" title="before_sleep">before_sleep</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-EventSource-for-%26mut+T" title="&#38;mut T">&#38;mut T</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>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>Trait <span class="trait">EventSource</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub trait EventSource {
type <a href="#associatedtype.Event" class="associatedtype">Event</a>;
type <a href="#associatedtype.Metadata" class="associatedtype">Metadata</a>;
type <a href="#associatedtype.Ret" class="associatedtype">Ret</a>;
type <a href="#associatedtype.Error" class="associatedtype">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../client/backend/smallvec/alloc/boxed/struct.Box.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>&gt;&gt;;
const <a href="#associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS" class="constant">NEEDS_EXTRA_LIFECYCLE_EVENTS</a>: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> = false;
// Required methods
fn <a href="#tymethod.process_events" class="fn">process_events</a>&lt;F&gt;(
&amp;mut self,
readiness: <a class="struct" href="struct.Readiness.html" title="struct cosmic::cctk::sctk::reexports::calloop::Readiness">Readiness</a>,
token: <a class="struct" href="struct.Token.html" title="struct cosmic::cctk::sctk::reexports::calloop::Token">Token</a>,
callback: F,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="enum.PostAction.html" title="enum cosmic::cctk::sctk::reexports::calloop::PostAction">PostAction</a>, Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Error" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Error">Error</a>&gt;
<span class="where">where F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Event" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Event">Event</a>, &amp;mut Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Metadata" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Metadata">Metadata</a>) -&gt; Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Ret" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Ret">Ret</a></span>;
<span class="item-spacer"></span> fn <a href="#tymethod.register" class="fn">register</a>(
&amp;mut self,
poll: &amp;mut <a class="struct" href="struct.Poll.html" title="struct cosmic::cctk::sctk::reexports::calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct cosmic::cctk::sctk::reexports::calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.reregister" class="fn">reregister</a>(
&amp;mut self,
poll: &amp;mut <a class="struct" href="struct.Poll.html" title="struct cosmic::cctk::sctk::reexports::calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct cosmic::cctk::sctk::reexports::calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.unregister" class="fn">unregister</a>(&amp;mut self, poll: &amp;mut <a class="struct" href="struct.Poll.html" title="struct cosmic::cctk::sctk::reexports::calloop::Poll">Poll</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt;;
// Provided methods
fn <a href="#method.before_sleep" class="fn">before_sleep</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="struct.Readiness.html" title="struct cosmic::cctk::sctk::reexports::calloop::Readiness">Readiness</a>, <a class="struct" href="struct.Token.html" title="struct cosmic::cctk::sctk::reexports::calloop::Token">Token</a>)&gt;, <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.before_handle_events" class="fn">before_handle_events</a>(&amp;mut self, events: <a class="struct" href="struct.EventIterator.html" title="struct cosmic::cctk::sctk::reexports::calloop::EventIterator">EventIterator</a>&lt;'_&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>Trait representing an event source</p>
<p>This is the trait you need to implement if you wish to create your own
calloop-compatible event sources.</p>
<p>The 3 associated types define the type of closure the user will need to
provide to process events for your event source.</p>
<p>The <code>process_events</code> method will be called when one of the FD you registered
is ready, with the associated readiness and token.</p>
<p>The <code>register</code>, <code>reregister</code> and <code>unregister</code> methods are plumbing to let your
source register itself with the polling system. See their documentation for details.</p>
<p>In case your event source needs to do some special processing before or after a
polling session occurs (to prepare the underlying source for polling, and cleanup
after that), you can override <a href="trait.EventSource.html#associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS" title="associated constant cosmic::cctk::sctk::reexports::calloop::EventSource::NEEDS_EXTRA_LIFECYCLE_EVENTS"><code>NEEDS_EXTRA_LIFECYCLE_EVENTS</code></a> to <code>true</code>.
For all sources for which that constant is <code>true</code>, the methods <a href="trait.EventSource.html#method.before_sleep" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::before_sleep"><code>before_sleep</code></a> and
<a href="trait.EventSource.html#method.before_handle_events" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::before_handle_events"><code>before_handle_events</code></a> will be called.
<a href="trait.EventSource.html#method.before_sleep" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::before_sleep"><code>before_sleep</code></a> is called before the polling system performs a poll operation.
<a href="trait.EventSource.html#method.before_handle_events" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::before_handle_events"><code>before_handle_events</code></a> is called before any process_events methods have been called.
This means that during <code>process_events</code> you can assume that all cleanup has occured on
all sources.</p>
</div></details><h2 id="provided-associated-consts" class="section-header">Provided Associated Constants<a href="#provided-associated-consts" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS" class="method"><h4 class="code-header">const <a href="#associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS" class="constant">NEEDS_EXTRA_LIFECYCLE_EVENTS</a>: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> = false</h4></section></summary><div class="docblock"><p>Whether this source needs to be sent the <a href="trait.EventSource.html#method.before_sleep" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::before_sleep"><code>EventSource::before_sleep</code></a>
and <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> notifications. These are opt-in because
they require more expensive checks, and almost all sources will not need these notifications</p>
</div></details></div><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Event" class="method"><h4 class="code-header">type <a href="#associatedtype.Event" class="associatedtype">Event</a></h4></section></summary><div class="docblock"><p>The type of events generated by your source.</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.Metadata" class="method"><h4 class="code-header">type <a href="#associatedtype.Metadata" class="associatedtype">Metadata</a></h4></section></summary><div class="docblock"><p>Some metadata of your event source</p>
<p>This is typically useful if your source contains some internal state that
the user may need to interact with when processing events. The user callback
will receive a <code>&amp;mut Metadata</code> reference.</p>
<p>Set to <code>()</code> if not needed.</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.Ret" class="method"><h4 class="code-header">type <a href="#associatedtype.Ret" class="associatedtype">Ret</a></h4></section></summary><div class="docblock"><p>The return type of the user callback</p>
<p>If the user needs to return some value back to your event source once its
processing is finshed (to indicate success or failure for example), you can
specify it using this type.</p>
<p>Set to <code>()</code> if not needed.</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.Error" class="method"><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../client/backend/smallvec/alloc/boxed/struct.Box.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>The error type returned from
<a href="trait.EventSource.html#tymethod.process_events" title="method calloop::sources::EventSource::process_events::process_events"><code>process_events()</code></a> (not the user callback!).</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.process_events" class="method"><h4 class="code-header">fn <a href="#tymethod.process_events" class="fn">process_events</a>&lt;F&gt;(
&amp;mut self,
readiness: <a class="struct" href="struct.Readiness.html" title="struct cosmic::cctk::sctk::reexports::calloop::Readiness">Readiness</a>,
token: <a class="struct" href="struct.Token.html" title="struct cosmic::cctk::sctk::reexports::calloop::Token">Token</a>,
callback: F,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="enum.PostAction.html" title="enum cosmic::cctk::sctk::reexports::calloop::PostAction">PostAction</a>, Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Error" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Error">Error</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Event" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Event">Event</a>, &amp;mut Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Metadata" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Metadata">Metadata</a>) -&gt; Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Ret" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Ret">Ret</a>,</div></h4></section></summary><div class="docblock"><p>Process any relevant events</p>
<p>This method will be called every time one of the FD you registered becomes
ready, including the readiness details and the associated token.</p>
<p>Your event source will then do some processing of the file descriptor(s) to generate
events, and call the provided <code>callback</code> for each one of them.</p>
<p>You should ensure you drained the file descriptors of their events, especially if using
edge-triggered mode.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.register" class="method"><h4 class="code-header">fn <a href="#tymethod.register" class="fn">register</a>(
&amp;mut self,
poll: &amp;mut <a class="struct" href="struct.Poll.html" title="struct cosmic::cctk::sctk::reexports::calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct cosmic::cctk::sctk::reexports::calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Register yourself to this poll instance</p>
<p>You should register all your relevant file descriptors to the provided <a href="struct.Poll.html" title="struct cosmic::cctk::sctk::reexports::calloop::Poll"><code>Poll</code></a>
using its <a href="struct.Poll.html#method.register" title="struct cosmic::cctk::sctk::reexports::calloop::Poll"><code>Poll::register</code></a> method.</p>
<p>If you need to register more than one file descriptor, you can change the
<code>sub_id</code> field of the <a href="struct.Token.html" title="struct cosmic::cctk::sctk::reexports::calloop::Token"><code>Token</code></a> to differentiate between them.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.reregister" class="method"><h4 class="code-header">fn <a href="#tymethod.reregister" class="fn">reregister</a>(
&amp;mut self,
poll: &amp;mut <a class="struct" href="struct.Poll.html" title="struct cosmic::cctk::sctk::reexports::calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct cosmic::cctk::sctk::reexports::calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Re-register your file descriptors</p>
<p>Your should update the registration of all your relevant file descriptor to
the provided <a href="struct.Poll.html" title="struct cosmic::cctk::sctk::reexports::calloop::Poll"><code>Poll</code></a> using its <a href="struct.Poll.html#method.reregister" title="struct cosmic::cctk::sctk::reexports::calloop::Poll"><code>Poll::reregister</code></a>,
if necessary.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.unregister" class="method"><h4 class="code-header">fn <a href="#tymethod.unregister" class="fn">unregister</a>(&amp;mut self, poll: &amp;mut <a class="struct" href="struct.Poll.html" title="struct cosmic::cctk::sctk::reexports::calloop::Poll">Poll</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Unregister your file descriptors</p>
<p>You should unregister all your file descriptors from this <a href="struct.Poll.html" title="struct cosmic::cctk::sctk::reexports::calloop::Poll"><code>Poll</code></a> using its
<a href="struct.Poll.html#method.unregister" title="struct cosmic::cctk::sctk::reexports::calloop::Poll"><code>Poll::unregister</code></a> method.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.before_sleep" class="method"><h4 class="code-header">fn <a href="#method.before_sleep" class="fn">before_sleep</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="struct.Readiness.html" title="struct cosmic::cctk::sctk::reexports::calloop::Readiness">Readiness</a>, <a class="struct" href="struct.Token.html" title="struct cosmic::cctk::sctk::reexports::calloop::Token">Token</a>)&gt;, <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Notification that a single <code>poll</code> is about to begin</p>
<p>Use this to perform operations which must be done before polling,
but which may conflict with other event handlers. For example,
if polling requires a lock to be taken</p>
<p>If this returns Ok(Some), this will be treated as an event arriving in polling, and
your event handler will be called with the returned <code>Token</code> and <code>Readiness</code>.
Polling will however still occur, but with a timeout of 0, so additional events
from this or other sources may also be handled in the same iterations.
The returned <code>Token</code> must belong to this source</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.before_handle_events" class="method"><h4 class="code-header">fn <a href="#method.before_handle_events" class="fn">before_handle_events</a>(&amp;mut self, events: <a class="struct" href="struct.EventIterator.html" title="struct cosmic::cctk::sctk::reexports::calloop::EventIterator">EventIterator</a>&lt;'_&gt;)</h4></section></summary><div class="docblock"><p>Notification that polling is complete, and <a href="trait.EventSource.html#tymethod.process_events" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::process_events"><code>EventSource::process_events</code></a> will
be called with the given events for this source. The iterator may be empty,
which indicates that no events were generated for this source</p>
<p>Please note, the iterator excludes any synthetic events returned from
<a href="trait.EventSource.html#method.before_sleep" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::before_sleep"><code>EventSource::before_sleep</code></a></p>
<p>Use this to perform a cleanup before event handlers with arbitrary
code may run. This could be used to drop a lock obtained in
<a href="trait.EventSource.html#method.before_sleep" title="method cosmic::cctk::sctk::reexports::calloop::EventSource::before_sleep"><code>EventSource::before_sleep</code></a></p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-EventSource-for-%26mut+T" class="impl"><a href="#impl-EventSource-for-%26mut+T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a><div class="where">where
T: <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>,</div></h3><div class="docblock"><p>Blanket implementation for exclusive references to event sources.
<a href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource"><code>EventSource</code></a> is not an object safe trait, so this does not include trait
objects.</p>
</div></section></summary><div class="impl-items"><section id="associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS-1" class="associatedconstant trait-impl"><a href="#associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS-1" class="anchor">§</a><h4 class="code-header">const <a href="#associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS" class="constant">NEEDS_EXTRA_LIFECYCLE_EVENTS</a>: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> = T::NEEDS_EXTRA_LIFECYCLE_EVENTS</h4></section><section id="associatedtype.Event-1" class="associatedtype trait-impl"><a href="#associatedtype.Event-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Event" class="associatedtype">Event</a> = &lt;T as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Event" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Event">Event</a></h4></section><section id="associatedtype.Metadata-1" class="associatedtype trait-impl"><a href="#associatedtype.Metadata-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Metadata" class="associatedtype">Metadata</a> = &lt;T as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Metadata" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Metadata">Metadata</a></h4></section><section id="associatedtype.Ret-1" class="associatedtype trait-impl"><a href="#associatedtype.Ret-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ret" class="associatedtype">Ret</a> = &lt;T as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Ret" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Ret">Ret</a></h4></section><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = &lt;T as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Error" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Error">Error</a></h4></section><section id="method.process_events" class="method trait-impl"><a href="#method.process_events" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.process_events" class="fn">process_events</a>&lt;F&gt;(
&amp;mut self,
readiness: <a class="struct" href="struct.Readiness.html" title="struct cosmic::cctk::sctk::reexports::calloop::Readiness">Readiness</a>,
token: <a class="struct" href="struct.Token.html" title="struct cosmic::cctk::sctk::reexports::calloop::Token">Token</a>,
callback: F,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="enum.PostAction.html" title="enum cosmic::cctk::sctk::reexports::calloop::PostAction">PostAction</a>, &lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a> as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Error" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Error">Error</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a> as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Event" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Event">Event</a>, &amp;mut &lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a> as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Metadata" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Metadata">Metadata</a>) -&gt; &lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a> as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Ret" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Ret">Ret</a>,</div></h4></section><section id="method.register" class="method trait-impl"><a href="#method.register" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.register" class="fn">register</a>(
&amp;mut self,
poll: &amp;mut <a class="struct" href="struct.Poll.html" title="struct cosmic::cctk::sctk::reexports::calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct cosmic::cctk::sctk::reexports::calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt;</h4></section><section id="method.reregister" class="method trait-impl"><a href="#method.reregister" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.reregister" class="fn">reregister</a>(
&amp;mut self,
poll: &amp;mut <a class="struct" href="struct.Poll.html" title="struct cosmic::cctk::sctk::reexports::calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct cosmic::cctk::sctk::reexports::calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt;</h4></section><section id="method.unregister" class="method trait-impl"><a href="#method.unregister" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.unregister" class="fn">unregister</a>(&amp;mut self, poll: &amp;mut <a class="struct" href="struct.Poll.html" title="struct cosmic::cctk::sctk::reexports::calloop::Poll">Poll</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt;</h4></section><section id="method.before_sleep-1" class="method trait-impl"><a href="#method.before_sleep-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.before_sleep" class="fn">before_sleep</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="struct.Readiness.html" title="struct cosmic::cctk::sctk::reexports::calloop::Readiness">Readiness</a>, <a class="struct" href="struct.Token.html" title="struct cosmic::cctk::sctk::reexports::calloop::Token">Token</a>)&gt;, <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a>&gt;</h4></section><section id="method.before_handle_events-1" class="method trait-impl"><a href="#method.before_handle_events-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.before_handle_events" class="fn">before_handle_events</a>(&amp;mut self, events: <a class="struct" href="struct.EventIterator.html" title="struct cosmic::cctk::sctk::reexports::calloop::EventIterator">EventIterator</a>&lt;'_&gt;)</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-EventSource-for-ReadPipe" class="impl"><a href="#impl-EventSource-for-ReadPipe" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a> for <a class="struct" href="../../data_device_manager/struct.ReadPipe.html" title="struct cosmic::cctk::sctk::data_device_manager::ReadPipe">ReadPipe</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Event-2" class="associatedtype trait-impl"><a href="#associatedtype.Event-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Event" class="associatedtype">Event</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <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></h4></section><section id="associatedtype.Metadata-2" class="associatedtype trait-impl"><a href="#associatedtype.Metadata-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Metadata" class="associatedtype">Metadata</a> = <a class="struct" href="generic/struct.NoIoDrop.html" title="struct cosmic::cctk::sctk::reexports::calloop::generic::NoIoDrop">NoIoDrop</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/std/fs/struct.File.html" title="struct std::fs::File">File</a>&gt;</h4></section><section id="associatedtype.Ret-2" class="associatedtype trait-impl"><a href="#associatedtype.Ret-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ret" class="associatedtype">Ret</a> = <a class="enum" href="enum.PostAction.html" title="enum cosmic::cctk::sctk::reexports::calloop::PostAction">PostAction</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-EventSource-for-WritePipe" class="impl"><a href="#impl-EventSource-for-WritePipe" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a> for <a class="struct" href="../../data_device_manager/struct.WritePipe.html" title="struct cosmic::cctk::sctk::data_device_manager::WritePipe">WritePipe</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Event-3" class="associatedtype trait-impl"><a href="#associatedtype.Event-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Event" class="associatedtype">Event</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <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></h4></section><section id="associatedtype.Metadata-3" class="associatedtype trait-impl"><a href="#associatedtype.Metadata-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Metadata" class="associatedtype">Metadata</a> = <a class="struct" href="generic/struct.NoIoDrop.html" title="struct cosmic::cctk::sctk::reexports::calloop::generic::NoIoDrop">NoIoDrop</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/std/fs/struct.File.html" title="struct std::fs::File">File</a>&gt;</h4></section><section id="associatedtype.Ret-3" class="associatedtype trait-impl"><a href="#associatedtype.Ret-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ret" class="associatedtype">Ret</a> = <a class="enum" href="enum.PostAction.html" title="enum cosmic::cctk::sctk::reexports::calloop::PostAction">PostAction</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-EventSource-for-Timer" class="impl"><a href="#impl-EventSource-for-Timer" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a> for <a class="struct" href="timer/struct.Timer.html" title="struct cosmic::cctk::sctk::reexports::calloop::timer::Timer">Timer</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Event-4" class="associatedtype trait-impl"><a href="#associatedtype.Event-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Event" class="associatedtype">Event</a> = <a class="struct" href="../../../../iced/time/struct.Instant.html" title="struct cosmic::iced::time::Instant">Instant</a></h4></section><section id="associatedtype.Metadata-4" class="associatedtype trait-impl"><a href="#associatedtype.Metadata-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Metadata" class="associatedtype">Metadata</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Ret-4" class="associatedtype trait-impl"><a href="#associatedtype.Ret-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ret" class="associatedtype">Ret</a> = <a class="enum" href="timer/enum.TimeoutAction.html" title="enum cosmic::cctk::sctk::reexports::calloop::timer::TimeoutAction">TimeoutAction</a></h4></section><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <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></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-EventSource-for-WaylandSource%3CD%3E" class="impl"><a href="#impl-EventSource-for-WaylandSource%3CD%3E" class="anchor">§</a><h3 class="code-header">impl&lt;D&gt; <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a> for <a class="struct" href="../calloop_wayland_source/struct.WaylandSource.html" title="struct cosmic::cctk::sctk::reexports::calloop_wayland_source::WaylandSource">WaylandSource</a>&lt;D&gt;</h3></section></summary><div class="impl-items"><section id="associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS-2" class="associatedconstant trait-impl"><a href="#associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS-2" class="anchor">§</a><h4 class="code-header">const <a href="#associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS" class="constant">NEEDS_EXTRA_LIFECYCLE_EVENTS</a>: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> = true</h4></section><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum cosmic::cctk::sctk::reexports::calloop::Error">Error</a></h4></section><section id="associatedtype.Event-5" class="associatedtype trait-impl"><a href="#associatedtype.Event-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Event" class="associatedtype">Event</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Metadata-5" class="associatedtype trait-impl"><a href="#associatedtype.Metadata-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Metadata" class="associatedtype">Metadata</a> = <a class="struct" href="../client/struct.EventQueue.html" title="struct cosmic::cctk::sctk::reexports::client::EventQueue">EventQueue</a>&lt;D&gt;</h4></section><section id="associatedtype.Ret-5" class="associatedtype trait-impl"><a href="#associatedtype.Ret-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ret" class="associatedtype">Ret</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="enum" href="../client/enum.DispatchError.html" title="enum cosmic::cctk::sctk::reexports::client::DispatchError">DispatchError</a>&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-EventSource-for-Generic%3CF,+E%3E" class="impl"><a href="#impl-EventSource-for-Generic%3CF,+E%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F, E&gt; <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a> for <a class="struct" href="generic/struct.Generic.html" title="struct cosmic::cctk::sctk::reexports::calloop::generic::Generic">Generic</a>&lt;F, E&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/std/os/fd/owned/trait.AsFd.html" title="trait std::os::fd::owned::AsFd">AsFd</a>,
E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../client/backend/smallvec/alloc/boxed/struct.Box.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>&gt;&gt;,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Event-6" class="associatedtype trait-impl"><a href="#associatedtype.Event-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Event" class="associatedtype">Event</a> = <a class="struct" href="struct.Readiness.html" title="struct cosmic::cctk::sctk::reexports::calloop::Readiness">Readiness</a></h4></section><section id="associatedtype.Metadata-6" class="associatedtype trait-impl"><a href="#associatedtype.Metadata-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Metadata" class="associatedtype">Metadata</a> = <a class="struct" href="generic/struct.NoIoDrop.html" title="struct cosmic::cctk::sctk::reexports::calloop::generic::NoIoDrop">NoIoDrop</a>&lt;F&gt;</h4></section><section id="associatedtype.Ret-6" class="associatedtype trait-impl"><a href="#associatedtype.Ret-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ret" class="associatedtype">Ret</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="enum.PostAction.html" title="enum cosmic::cctk::sctk::reexports::calloop::PostAction">PostAction</a>, E&gt;</h4></section><section id="associatedtype.Error-6" class="associatedtype trait-impl"><a href="#associatedtype.Error-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = E</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-EventSource-for-Box%3CT%3E" class="impl"><a href="#impl-EventSource-for-Box%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a> for <a class="struct" href="../client/backend/smallvec/alloc/boxed/struct.Box.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::boxed::Box">Box</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>,</div></h3><div class="docblock"><p>Blanket implementation for boxed event sources. <a href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource"><code>EventSource</code></a> is not an
object safe trait, so this does not include trait objects.</p>
</div></section></summary><div class="impl-items"><section id="associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS-3" class="associatedconstant trait-impl"><a href="#associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS-3" class="anchor">§</a><h4 class="code-header">const <a href="#associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS" class="constant">NEEDS_EXTRA_LIFECYCLE_EVENTS</a>: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> = T::NEEDS_EXTRA_LIFECYCLE_EVENTS</h4></section><section id="associatedtype.Event-7" class="associatedtype trait-impl"><a href="#associatedtype.Event-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Event" class="associatedtype">Event</a> = &lt;T as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Event" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Event">Event</a></h4></section><section id="associatedtype.Metadata-7" class="associatedtype trait-impl"><a href="#associatedtype.Metadata-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Metadata" class="associatedtype">Metadata</a> = &lt;T as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Metadata" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Metadata">Metadata</a></h4></section><section id="associatedtype.Ret-7" class="associatedtype trait-impl"><a href="#associatedtype.Ret-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ret" class="associatedtype">Ret</a> = &lt;T as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Ret" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Ret">Ret</a></h4></section><section id="associatedtype.Error-7" class="associatedtype trait-impl"><a href="#associatedtype.Error-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = &lt;T as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Error" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Error">Error</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-EventSource-for-Channel%3CT%3E" class="impl"><a href="#impl-EventSource-for-Channel%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a> for <a class="struct" href="channel/struct.Channel.html" title="struct cosmic::cctk::sctk::reexports::calloop::channel::Channel">Channel</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Event-8" class="associatedtype trait-impl"><a href="#associatedtype.Event-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Event" class="associatedtype">Event</a> = <a class="enum" href="channel/enum.Event.html" title="enum cosmic::cctk::sctk::reexports::calloop::channel::Event">Event</a>&lt;T&gt;</h4></section><section id="associatedtype.Metadata-8" class="associatedtype trait-impl"><a href="#associatedtype.Metadata-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Metadata" class="associatedtype">Metadata</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Ret-8" class="associatedtype trait-impl"><a href="#associatedtype.Ret-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ret" class="associatedtype">Ret</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Error-8" class="associatedtype trait-impl"><a href="#associatedtype.Error-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="channel/struct.ChannelError.html" title="struct cosmic::cctk::sctk::reexports::calloop::channel::ChannelError">ChannelError</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-EventSource-for-TransientSource%3CT%3E" class="impl"><a href="#impl-EventSource-for-TransientSource%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a> for <a class="struct" href="transient/struct.TransientSource.html" title="struct cosmic::cctk::sctk::reexports::calloop::transient::TransientSource">TransientSource</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Event-9" class="associatedtype trait-impl"><a href="#associatedtype.Event-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Event" class="associatedtype">Event</a> = &lt;T as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Event" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Event">Event</a></h4></section><section id="associatedtype.Metadata-9" class="associatedtype trait-impl"><a href="#associatedtype.Metadata-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Metadata" class="associatedtype">Metadata</a> = &lt;T as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Metadata" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Metadata">Metadata</a></h4></section><section id="associatedtype.Ret-9" class="associatedtype trait-impl"><a href="#associatedtype.Ret-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ret" class="associatedtype">Ret</a> = &lt;T as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Ret" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Ret">Ret</a></h4></section><section id="associatedtype.Error-9" class="associatedtype trait-impl"><a href="#associatedtype.Error-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = &lt;T as <a class="trait" href="trait.EventSource.html" title="trait cosmic::cctk::sctk::reexports::calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Error" title="type cosmic::cctk::sctk::reexports::calloop::EventSource::Error">Error</a></h4></section></div></details></div><script src="../../../../../trait.impl/calloop/sources/trait.EventSource.js" data-ignore-extern-crates="smithay_client_toolkit,calloop,alloc,calloop_wayland_source" async></script></section></div></main></body></html>