Files
phy/calloop/trait.EventSource.html
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

151 lines
52 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 calloop - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="calloop" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.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="../calloop/index.html">calloop</a><span class="version">0.13.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><li><a href="#impl-EventSource-for-Box%3CT%3E" title="Box&#60;T&#62;">Box&#60;T&#62;</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 class="in-crate"><a href="index.html">In crate calloop</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">calloop</a></span><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"><a class="src" href="../src/calloop/sources/mod.rs.html#102-202">Source</a> </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/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/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/1.84.0/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 calloop::Readiness">Readiness</a>,
token: <a class="struct" href="struct.Token.html" title="struct calloop::Token">Token</a>,
callback: F,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="enum.PostAction.html" title="enum calloop::PostAction">PostAction</a>, Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Error" title="type calloop::EventSource::Error">Error</a>&gt;
<span class="where">where F: <a class="trait" href="https://doc.rust-lang.org/1.84.0/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 calloop::EventSource::Event">Event</a>, &amp;mut Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Metadata" title="type calloop::EventSource::Metadata">Metadata</a>) -&gt; Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Ret" title="type 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 calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</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 calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</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 calloop::Poll">Poll</a>) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>&gt;;
// Provided methods
fn <a href="#method.before_sleep" class="fn">before_sleep</a>(&amp;mut self) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="struct.Readiness.html" title="struct calloop::Readiness">Readiness</a>, <a class="struct" href="struct.Token.html" title="struct calloop::Token">Token</a>)&gt;&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 calloop::EventIterator">EventIterator</a>&lt;'_&gt;) { ... }
}</code></pre><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 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 calloop::EventSource::before_sleep"><code>before_sleep</code></a> and
<a href="trait.EventSource.html#method.before_handle_events" title="method calloop::EventSource::before_handle_events"><code>before_handle_events</code></a> will be called.
<a href="trait.EventSource.html#method.before_sleep" title="method 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 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"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#173">Source</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/1.84.0/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 calloop::EventSource::before_sleep"><code>EventSource::before_sleep</code></a>
and <a href="trait.EventSource.html#method.before_handle_events" title="method 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"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#104">Source</a><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"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#112">Source</a><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"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#120">Source</a><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"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#123">Source</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a>: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/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"><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"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#135-142">Source</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 calloop::Readiness">Readiness</a>,
token: <a class="struct" href="struct.Token.html" title="struct calloop::Token">Token</a>,
callback: F,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="enum.PostAction.html" title="enum calloop::PostAction">PostAction</a>, Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Error" title="type calloop::EventSource::Error">Error</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.84.0/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 calloop::EventSource::Event">Event</a>, &amp;mut Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Metadata" title="type calloop::EventSource::Metadata">Metadata</a>) -&gt; Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Ret" title="type 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"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#151">Source</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 calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</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 calloop::Poll"><code>Poll</code></a>
using its <a href="struct.Poll.html#method.register" title="struct 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 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"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#158-162">Source</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 calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</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 calloop::Poll"><code>Poll</code></a> using its <a href="struct.Poll.html#method.reregister" title="struct 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"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#168">Source</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 calloop::Poll">Poll</a>) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</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 calloop::Poll"><code>Poll</code></a> using its
<a href="struct.Poll.html#method.unregister" title="struct 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"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#187-189">Source</a><h4 class="code-header">fn <a href="#method.before_sleep" class="fn">before_sleep</a>(&amp;mut self) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="struct.Readiness.html" title="struct calloop::Readiness">Readiness</a>, <a class="struct" href="struct.Token.html" title="struct calloop::Token">Token</a>)&gt;&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"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#201">Source</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 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 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 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 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/1.84.0/reference/items/traits.html#object-safety">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 class="src rightside" href="../src/calloop/sources/mod.rs.html#254-297">Source</a><a href="#impl-EventSource-for-%26mut+T" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EventSource.html" title="trait calloop::EventSource">EventSource</a>&gt; <a class="trait" href="trait.EventSource.html" title="trait calloop::EventSource">EventSource</a> for <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;mut T</a></h3></section></summary><div class="docblock"><p>Blanket implementation for exclusive references to event sources.
<a href="trait.EventSource.html" title="trait calloop::EventSource"><code>EventSource</code></a> is not an object safe trait, so this does not include trait
objects.</p>
</div><div class="impl-items"><section id="associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS-1" class="associatedconstant trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#288">Source</a><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/1.84.0/std/primitive.bool.html">bool</a> = T::NEEDS_EXTRA_LIFECYCLE_EVENTS</h4></section><section id="associatedtype.Event-1" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#255">Source</a><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 calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Event" title="type calloop::EventSource::Event">Event</a></h4></section><section id="associatedtype.Metadata-1" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#256">Source</a><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 calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Metadata" title="type calloop::EventSource::Metadata">Metadata</a></h4></section><section id="associatedtype.Ret-1" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#257">Source</a><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 calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Ret" title="type calloop::EventSource::Ret">Ret</a></h4></section><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#258">Source</a><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 calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Error" title="type calloop::EventSource::Error">Error</a></h4></section><section id="method.process_events" class="method trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#260-270">Source</a><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 calloop::Readiness">Readiness</a>,
token: <a class="struct" href="struct.Token.html" title="struct calloop::Token">Token</a>,
callback: F,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="enum.PostAction.html" title="enum calloop::PostAction">PostAction</a>, Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Error" title="type calloop::EventSource::Error">Error</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.84.0/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 calloop::EventSource::Event">Event</a>, &amp;mut Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Metadata" title="type calloop::EventSource::Metadata">Metadata</a>) -&gt; Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Ret" title="type calloop::EventSource::Ret">Ret</a>,</div></h4></section><section id="method.register" class="method trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#272-274">Source</a><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 calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>&gt;</h4></section><section id="method.reregister" class="method trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#276-282">Source</a><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 calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>&gt;</h4></section><section id="method.unregister" class="method trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#284-286">Source</a><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 calloop::Poll">Poll</a>) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>&gt;</h4></section><section id="method.before_sleep-1" class="method trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#290-292">Source</a><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="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="struct.Readiness.html" title="struct calloop::Readiness">Readiness</a>, <a class="struct" href="struct.Token.html" title="struct calloop::Token">Token</a>)&gt;&gt;</h4></section><section id="method.before_handle_events-1" class="method trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#294-296">Source</a><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 calloop::EventIterator">EventIterator</a>&lt;'_&gt;)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-EventSource-for-Box%3CT%3E" class="impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#206-249">Source</a><a href="#impl-EventSource-for-Box%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EventSource.html" title="trait calloop::EventSource">EventSource</a>&gt; <a class="trait" href="trait.EventSource.html" title="trait calloop::EventSource">EventSource</a> for <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T&gt;</h3></section></summary><div class="docblock"><p>Blanket implementation for boxed event sources. <a href="trait.EventSource.html" title="trait calloop::EventSource"><code>EventSource</code></a> is not an
object safe trait, so this does not include trait objects.</p>
</div><div class="impl-items"><section id="associatedconstant.NEEDS_EXTRA_LIFECYCLE_EVENTS-2" class="associatedconstant trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#240">Source</a><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/1.84.0/std/primitive.bool.html">bool</a> = T::NEEDS_EXTRA_LIFECYCLE_EVENTS</h4></section><section id="associatedtype.Event-2" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#207">Source</a><a href="#associatedtype.Event-2" 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 calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Event" title="type calloop::EventSource::Event">Event</a></h4></section><section id="associatedtype.Metadata-2" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#208">Source</a><a href="#associatedtype.Metadata-2" 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 calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Metadata" title="type calloop::EventSource::Metadata">Metadata</a></h4></section><section id="associatedtype.Ret-2" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#209">Source</a><a href="#associatedtype.Ret-2" 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 calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Ret" title="type calloop::EventSource::Ret">Ret</a></h4></section><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#210">Source</a><a href="#associatedtype.Error-2" 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 calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Error" title="type calloop::EventSource::Error">Error</a></h4></section><section id="method.process_events-1" class="method trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#212-222">Source</a><a href="#method.process_events-1" 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 calloop::Readiness">Readiness</a>,
token: <a class="struct" href="struct.Token.html" title="struct calloop::Token">Token</a>,
callback: F,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="enum.PostAction.html" title="enum calloop::PostAction">PostAction</a>, Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Error" title="type calloop::EventSource::Error">Error</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.84.0/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 calloop::EventSource::Event">Event</a>, &amp;mut Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Metadata" title="type calloop::EventSource::Metadata">Metadata</a>) -&gt; Self::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Ret" title="type calloop::EventSource::Ret">Ret</a>,</div></h4></section><section id="method.register-1" class="method trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#224-226">Source</a><a href="#method.register-1" 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 calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>&gt;</h4></section><section id="method.reregister-1" class="method trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#228-234">Source</a><a href="#method.reregister-1" 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 calloop::Poll">Poll</a>,
token_factory: &amp;mut <a class="struct" href="struct.TokenFactory.html" title="struct calloop::TokenFactory">TokenFactory</a>,
) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>&gt;</h4></section><section id="method.unregister-1" class="method trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#236-238">Source</a><a href="#method.unregister-1" 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 calloop::Poll">Poll</a>) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>&gt;</h4></section><section id="method.before_sleep-2" class="method trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#242-244">Source</a><a href="#method.before_sleep-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.before_sleep" class="fn">before_sleep</a>(&amp;mut self) -&gt; <a class="type" href="error/type.Result.html" title="type calloop::error::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="struct.Readiness.html" title="struct calloop::Readiness">Readiness</a>, <a class="struct" href="struct.Token.html" title="struct calloop::Token">Token</a>)&gt;&gt;</h4></section><section id="method.before_handle_events-2" class="method trait-impl"><a class="src rightside" href="../src/calloop/sources/mod.rs.html#246-248">Source</a><a href="#method.before_handle_events-2" 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 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-Timer" class="impl"><a class="src rightside" href="../src/calloop/sources/timer.rs.html#103-176">Source</a><a href="#impl-EventSource-for-Timer" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.EventSource.html" title="trait calloop::EventSource">EventSource</a> for <a class="struct" href="timer/struct.Timer.html" title="struct calloop::timer::Timer">Timer</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Event-3" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/timer.rs.html#104">Source</a><a href="#associatedtype.Event-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Event" class="associatedtype">Event</a> = <a class="struct" href="https://doc.rust-lang.org/1.84.0/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a></h4></section><section id="associatedtype.Metadata-3" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/timer.rs.html#105">Source</a><a href="#associatedtype.Metadata-3" 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/1.84.0/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Ret-3" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/timer.rs.html#106">Source</a><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="timer/enum.TimeoutAction.html" title="enum calloop::timer::TimeoutAction">TimeoutAction</a></h4></section><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/timer.rs.html#107">Source</a><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="https://doc.rust-lang.org/1.84.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-EventSource-for-Generic%3CF,+E%3E" class="impl"><a class="src rightside" href="../src/calloop/sources/generic.rs.html#266-340">Source</a><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 calloop::EventSource">EventSource</a> for <a class="struct" href="generic/struct.Generic.html" title="struct calloop::generic::Generic">Generic</a>&lt;F, E&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.84.0/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/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>&gt;&gt;,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Event-4" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/generic.rs.html#271">Source</a><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="struct.Readiness.html" title="struct calloop::Readiness">Readiness</a></h4></section><section id="associatedtype.Metadata-4" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/generic.rs.html#272">Source</a><a href="#associatedtype.Metadata-4" 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 calloop::generic::NoIoDrop">NoIoDrop</a>&lt;F&gt;</h4></section><section id="associatedtype.Ret-4" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/generic.rs.html#273">Source</a><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="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="enum.PostAction.html" title="enum calloop::PostAction">PostAction</a>, E&gt;</h4></section><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/generic.rs.html#274">Source</a><a href="#associatedtype.Error-4" 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-Channel%3CT%3E" class="impl"><a class="src rightside" href="../src/calloop/sources/channel.rs.html#168-213">Source</a><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 calloop::EventSource">EventSource</a> for <a class="struct" href="channel/struct.Channel.html" title="struct calloop::channel::Channel">Channel</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Event-5" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/channel.rs.html#169">Source</a><a href="#associatedtype.Event-5" 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 calloop::channel::Event">Event</a>&lt;T&gt;</h4></section><section id="associatedtype.Metadata-5" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/channel.rs.html#170">Source</a><a href="#associatedtype.Metadata-5" 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/1.84.0/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Ret-5" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/channel.rs.html#171">Source</a><a href="#associatedtype.Ret-5" 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/1.84.0/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/channel.rs.html#172">Source</a><a href="#associatedtype.Error-5" 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 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 class="src rightside" href="../src/calloop/sources/transient.rs.html#244-366">Source</a><a href="#impl-EventSource-for-TransientSource%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EventSource.html" title="trait calloop::EventSource">EventSource</a>&gt; <a class="trait" href="trait.EventSource.html" title="trait calloop::EventSource">EventSource</a> for <a class="struct" href="transient/struct.TransientSource.html" title="struct calloop::transient::TransientSource">TransientSource</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Event-6" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/transient.rs.html#245">Source</a><a href="#associatedtype.Event-6" 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 calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Event" title="type calloop::EventSource::Event">Event</a></h4></section><section id="associatedtype.Metadata-6" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/transient.rs.html#246">Source</a><a href="#associatedtype.Metadata-6" 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 calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Metadata" title="type calloop::EventSource::Metadata">Metadata</a></h4></section><section id="associatedtype.Ret-6" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/transient.rs.html#247">Source</a><a href="#associatedtype.Ret-6" 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 calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Ret" title="type calloop::EventSource::Ret">Ret</a></h4></section><section id="associatedtype.Error-6" class="associatedtype trait-impl"><a class="src rightside" href="../src/calloop/sources/transient.rs.html#248">Source</a><a href="#associatedtype.Error-6" 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 calloop::EventSource">EventSource</a>&gt;::<a class="associatedtype" href="trait.EventSource.html#associatedtype.Error" title="type calloop::EventSource::Error">Error</a></h4></section></div></details></div><script src="../trait.impl/calloop/sources/trait.EventSource.js" data-ignore-extern-crates="alloc" async></script></section></div></main></body></html>