Files
phy/bevy_ecs/event/index.html
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

8 lines
12 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="Event handling types."><title>bevy_ecs::event - 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="bevy_ecs" 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="icon" href="https://bevyengine.org/assets/icon.png"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../bevy_ecs/index.html"><img src="https://bevyengine.org/assets/icon.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../bevy_ecs/index.html"><img src="https://bevyengine.org/assets/icon.png" alt="logo"></a><h2><a href="../../bevy_ecs/index.html">bevy_<wbr>ecs</a><span class="version">0.15.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module event</a></h2><h3><a href="#reexports">Module Items</a></h3><ul class="block"><li><a href="#reexports" title="Re-exports">Re-exports</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li><li><a href="#derives" title="Derive Macros">Derive Macros</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate bevy_<wbr>ecs</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">bevy_ecs</a></span><h1>Module <span>event</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/bevy_ecs/event/mod.rs.html#1-625">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Event handling types.</p>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name" id="reexport.EventUpdates"><code>pub use update::EventUpdates;</code></div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.EventCursor.html" title="struct bevy_ecs::event::EventCursor">Event<wbr>Cursor</a></div><div class="desc docblock-short">Stores the state for an <a href="struct.EventReader.html" title="struct bevy_ecs::event::EventReader"><code>EventReader</code></a> or <a href="struct.EventMutator.html" title="struct bevy_ecs::event::EventMutator"><code>EventMutator</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.EventId.html" title="struct bevy_ecs::event::EventId">EventId</a></div><div class="desc docblock-short">An <code>EventId</code> uniquely identifies an event stored in a specific <a href="../world/struct.World.html" title="struct bevy_ecs::world::World"><code>World</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.EventIterator.html" title="struct bevy_ecs::event::EventIterator">Event<wbr>Iterator</a></div><div class="desc docblock-short">An iterator that yields any unread events from an <a href="struct.EventReader.html" title="struct bevy_ecs::event::EventReader"><code>EventReader</code></a> or <a href="struct.EventCursor.html" title="struct bevy_ecs::event::EventCursor"><code>EventCursor</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.EventIteratorWithId.html" title="struct bevy_ecs::event::EventIteratorWithId">Event<wbr>Iterator<wbr>With<wbr>Id</a></div><div class="desc docblock-short">An iterator that yields any unread events (and their IDs) from an <a href="struct.EventReader.html" title="struct bevy_ecs::event::EventReader"><code>EventReader</code></a> or <a href="struct.EventCursor.html" title="struct bevy_ecs::event::EventCursor"><code>EventCursor</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.EventMutIterator.html" title="struct bevy_ecs::event::EventMutIterator">Event<wbr>MutIterator</a></div><div class="desc docblock-short">An iterator that yields any unread events from an <a href="struct.EventMutator.html" title="struct bevy_ecs::event::EventMutator"><code>EventMutator</code></a> or <a href="struct.EventCursor.html" title="struct bevy_ecs::event::EventCursor"><code>EventCursor</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.EventMutIteratorWithId.html" title="struct bevy_ecs::event::EventMutIteratorWithId">Event<wbr>MutIterator<wbr>With<wbr>Id</a></div><div class="desc docblock-short">An iterator that yields any unread events (and their IDs) from an <a href="struct.EventMutator.html" title="struct bevy_ecs::event::EventMutator"><code>EventMutator</code></a> or <a href="struct.EventCursor.html" title="struct bevy_ecs::event::EventCursor"><code>EventCursor</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.EventMutParIter.html" title="struct bevy_ecs::event::EventMutParIter">Event<wbr>MutPar<wbr>Iter</a></div><div class="desc docblock-short">A parallel iterator over <code>Event</code>s.</div></li><li><div class="item-name"><a class="struct" href="struct.EventMutator.html" title="struct bevy_ecs::event::EventMutator">Event<wbr>Mutator</a></div><div class="desc docblock-short">Mutably reads events of type <code>T</code> keeping track of which events have already been read
by each system allowing multiple systems to read the same events. Ideal for chains of systems
that all want to modify the same events.</div></li><li><div class="item-name"><a class="struct" href="struct.EventParIter.html" title="struct bevy_ecs::event::EventParIter">Event<wbr>ParIter</a></div><div class="desc docblock-short">A parallel iterator over <code>Event</code>s.</div></li><li><div class="item-name"><a class="struct" href="struct.EventReader.html" title="struct bevy_ecs::event::EventReader">Event<wbr>Reader</a></div><div class="desc docblock-short">Reads events of type <code>T</code> in order and tracks which events have already been read.</div></li><li><div class="item-name"><a class="struct" href="struct.EventRegistry.html" title="struct bevy_ecs::event::EventRegistry">Event<wbr>Registry</a></div><div class="desc docblock-short">A registry of all of the <a href="struct.Events.html" title="struct bevy_ecs::event::Events"><code>Events</code></a> in the <a href="../world/struct.World.html" title="struct bevy_ecs::world::World"><code>World</code></a>, used by <a href="fn.event_update_system.html" title="fn bevy_ecs::event::event_update_system"><code>event_update_system</code></a>
to update all of the events.</div></li><li><div class="item-name"><a class="struct" href="struct.EventWriter.html" title="struct bevy_ecs::event::EventWriter">Event<wbr>Writer</a></div><div class="desc docblock-short">Sends events of type <code>T</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.Events.html" title="struct bevy_ecs::event::Events">Events</a></div><div class="desc docblock-short">An event collection that represents the events that occurred within the last two
<a href="struct.Events.html#method.update" title="method bevy_ecs::event::Events::update"><code>Events::update</code></a> calls.
Events can be written to using an <a href="struct.EventWriter.html" title="struct bevy_ecs::event::EventWriter"><code>EventWriter</code></a>
and are typically cheaply read using an <a href="struct.EventReader.html" title="struct bevy_ecs::event::EventReader"><code>EventReader</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.SendBatchIds.html" title="struct bevy_ecs::event::SendBatchIds">Send<wbr>Batch<wbr>Ids</a></div><div class="desc docblock-short"><a href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator"><code>Iterator</code></a> over sent <a href="struct.EventId.html" title="struct bevy_ecs::event::EventId"><code>EventIds</code></a> from a batch.</div></li><li><div class="item-name"><a class="struct" href="struct.SendEvent.html" title="struct bevy_ecs::event::SendEvent">Send<wbr>Event</a></div><div class="desc docblock-short">A command to send an arbitrary <a href="trait.Event.html" title="trait bevy_ecs::event::Event"><code>Event</code></a>, used by <a href="../system/struct.Commands.html#method.send_event" title="method bevy_ecs::system::Commands::send_event"><code>Commands::send_event</code></a>.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.ShouldUpdateEvents.html" title="enum bevy_ecs::event::ShouldUpdateEvents">Should<wbr>Update<wbr>Events</a></div><div class="desc docblock-short">Controls whether or not the events in an <a href="struct.EventRegistry.html" title="struct bevy_ecs::event::EventRegistry"><code>EventRegistry</code></a> should be updated.</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.Event.html" title="trait bevy_ecs::event::Event">Event</a></div><div class="desc docblock-short">Something that “happens” and might be read / observed by app logic.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.event_update_condition.html" title="fn bevy_ecs::event::event_update_condition">event_<wbr>update_<wbr>condition</a></div><div class="desc docblock-short">A run condition for <a href="fn.event_update_system.html" title="fn bevy_ecs::event::event_update_system"><code>event_update_system</code></a>.</div></li><li><div class="item-name"><a class="fn" href="fn.event_update_system.html" title="fn bevy_ecs::event::event_update_system">event_<wbr>update_<wbr>system</a></div><div class="desc docblock-short">A system that calls <a href="struct.Events.html#method.update" title="method bevy_ecs::event::Events::update"><code>Events::update</code></a> on all registered <a href="struct.Events.html" title="struct bevy_ecs::event::Events"><code>Events</code></a> in the world.</div></li><li><div class="item-name"><a class="fn" href="fn.signal_event_update_system.html" title="fn bevy_ecs::event::signal_event_update_system">signal_<wbr>event_<wbr>update_<wbr>system</a></div><div class="desc docblock-short">Signals the <a href="fn.event_update_system.html" title="fn bevy_ecs::event::event_update_system"><code>event_update_system</code></a> to run after <code>FixedUpdate</code> systems.</div></li></ul><h2 id="derives" class="section-header">Derive Macros<a href="#derives" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="derive" href="derive.Event.html" title="derive bevy_ecs::event::Event">Event</a></div></li></ul></section></div></main></body></html>