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

51 lines
29 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="State installation methods for `App` and `SubApp`."><title>AppExtStates in bevy_state::app - 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_state" 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="../../bevy_state/index.html">bevy_<wbr>state</a><span class="version">0.15.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">AppExt<wbr>States</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.add_computed_state" title="add_computed_state">add_computed_state</a></li><li><a href="#tymethod.add_sub_state" title="add_sub_state">add_sub_state</a></li><li><a href="#tymethod.enable_state_scoped_entities" title="enable_state_scoped_entities">enable_state_scoped_entities</a></li><li><a href="#tymethod.init_state" title="init_state">init_state</a></li><li><a href="#tymethod.insert_state" title="insert_state">insert_state</a></li><li><a href="#tymethod.register_type_mutable_state" title="register_type_mutable_state">register_type_mutable_state</a></li><li><a href="#tymethod.register_type_state" title="register_type_state">register_type_state</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-AppExtStates-for-App" title="App">App</a></li><li><a href="#impl-AppExtStates-for-SubApp" title="SubApp">SubApp</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 bevy_<wbr>state::<wbr>app</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_state</a>::<wbr><a href="index.html">app</a></span><h1>Trait <span class="trait">AppExtStates</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_state/app.rs.html#17-82">Source</a> </span></div><pre class="rust item-decl"><code>pub trait AppExtStates {
// Required methods
fn <a href="#tymethod.init_state" class="fn">init_state</a>&lt;S: <a class="trait" href="../state/trait.FreelyMutableState.html" title="trait bevy_state::state::FreelyMutableState">FreelyMutableState</a> + <a class="trait" href="../../bevy_ecs/world/trait.FromWorld.html" title="trait bevy_ecs::world::FromWorld">FromWorld</a>&gt;(&amp;mut self) -&gt; &amp;mut Self;
<span class="item-spacer"></span> fn <a href="#tymethod.insert_state" class="fn">insert_state</a>&lt;S: <a class="trait" href="../state/trait.FreelyMutableState.html" title="trait bevy_state::state::FreelyMutableState">FreelyMutableState</a>&gt;(&amp;mut self, state: S) -&gt; &amp;mut Self;
<span class="item-spacer"></span> fn <a href="#tymethod.add_computed_state" class="fn">add_computed_state</a>&lt;S: <a class="trait" href="../state/trait.ComputedStates.html" title="trait bevy_state::state::ComputedStates">ComputedStates</a>&gt;(&amp;mut self) -&gt; &amp;mut Self;
<span class="item-spacer"></span> fn <a href="#tymethod.add_sub_state" class="fn">add_sub_state</a>&lt;S: <a class="trait" href="../state/trait.SubStates.html" title="trait bevy_state::state::SubStates">SubStates</a>&gt;(&amp;mut self) -&gt; &amp;mut Self;
<span class="item-spacer"></span> fn <a href="#tymethod.enable_state_scoped_entities" class="fn">enable_state_scoped_entities</a>&lt;S: <a class="trait" href="../state/trait.States.html" title="trait bevy_state::state::States">States</a>&gt;(&amp;mut self) -&gt; &amp;mut Self;
<span class="item-spacer"></span> fn <a href="#tymethod.register_type_state" class="fn">register_type_state</a>&lt;S&gt;(&amp;mut self) -&gt; &amp;mut Self
<span class="where">where S: <a class="trait" href="../state/trait.States.html" title="trait bevy_state::state::States">States</a> + <a class="trait" href="../../bevy_reflect/from_reflect/trait.FromReflect.html" title="trait bevy_reflect::from_reflect::FromReflect">FromReflect</a> + <a class="trait" href="../../bevy_reflect/type_registry/trait.GetTypeRegistration.html" title="trait bevy_reflect::type_registry::GetTypeRegistration">GetTypeRegistration</a> + <a class="trait" href="../../bevy_reflect/type_info/trait.Typed.html" title="trait bevy_reflect::type_info::Typed">Typed</a></span>;
<span class="item-spacer"></span> fn <a href="#tymethod.register_type_mutable_state" class="fn">register_type_mutable_state</a>&lt;S&gt;(&amp;mut self) -&gt; &amp;mut Self
<span class="where">where S: <a class="trait" href="../state/trait.FreelyMutableState.html" title="trait bevy_state::state::FreelyMutableState">FreelyMutableState</a> + <a class="trait" href="../../bevy_reflect/from_reflect/trait.FromReflect.html" title="trait bevy_reflect::from_reflect::FromReflect">FromReflect</a> + <a class="trait" href="../../bevy_reflect/type_registry/trait.GetTypeRegistration.html" title="trait bevy_reflect::type_registry::GetTypeRegistration">GetTypeRegistration</a> + <a class="trait" href="../../bevy_reflect/type_info/trait.Typed.html" title="trait bevy_reflect::type_info::Typed">Typed</a></span>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>State installation methods for <a href="../../bevy_app/app/struct.App.html" title="struct bevy_app::app::App"><code>App</code></a> and <a href="../../bevy_app/sub_app/struct.SubApp.html" title="struct bevy_app::sub_app::SubApp"><code>SubApp</code></a>.</p>
</div></details><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.init_state" class="method"><a class="src rightside" href="../../src/bevy_state/app.rs.html#33">Source</a><h4 class="code-header">fn <a href="#tymethod.init_state" class="fn">init_state</a>&lt;S: <a class="trait" href="../state/trait.FreelyMutableState.html" title="trait bevy_state::state::FreelyMutableState">FreelyMutableState</a> + <a class="trait" href="../../bevy_ecs/world/trait.FromWorld.html" title="trait bevy_ecs::world::FromWorld">FromWorld</a>&gt;(&amp;mut self) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p>Initializes a <a href="../state/struct.State.html" title="struct bevy_state::state::State"><code>State</code></a> with standard starting values.</p>
<p>This method is idempotent: it has no effect when called again using the same generic type.</p>
<p>Adds <a href="../state/struct.State.html" title="struct bevy_state::state::State"><code>State&lt;S&gt;</code></a> and <a href="../state/enum.NextState.html" title="enum bevy_state::state::NextState"><code>NextState&lt;S&gt;</code></a> resources, and enables use of the <a href="../state/struct.OnEnter.html" title="struct bevy_state::state::OnEnter"><code>OnEnter</code></a>,
<a href="../state/struct.OnTransition.html" title="struct bevy_state::state::OnTransition"><code>OnTransition</code></a> and <a href="../state/struct.OnExit.html" title="struct bevy_state::state::OnExit"><code>OnExit</code></a> schedules.
These schedules are triggered before <a href="../../bevy_app/main_schedule/struct.Update.html" title="struct bevy_app::main_schedule::Update"><code>Update</code></a> and at startup.</p>
<p>If you would like to control how other systems run based on the current state, you can
emulate this behavior using the <a href="../condition/fn.in_state.html" title="fn bevy_state::condition::in_state"><code>in_state</code></a> <a href="../../bevy_ecs/schedule/condition/trait.Condition.html" title="trait bevy_ecs::schedule::condition::Condition"><code>Condition</code></a>.</p>
<p>Note that you can also apply state transitions at other points in the schedule
by triggering the <a href="../state/struct.StateTransition.html" title="struct bevy_state::state::StateTransition"><code>StateTransition</code></a> schedule manually.</p>
<p>The use of any states requires the presence of <a href="struct.StatesPlugin.html" title="struct bevy_state::app::StatesPlugin"><code>StatesPlugin</code></a> (which is included in <code>DefaultPlugins</code>).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.insert_state" class="method"><a class="src rightside" href="../../src/bevy_state/app.rs.html#47">Source</a><h4 class="code-header">fn <a href="#tymethod.insert_state" class="fn">insert_state</a>&lt;S: <a class="trait" href="../state/trait.FreelyMutableState.html" title="trait bevy_state::state::FreelyMutableState">FreelyMutableState</a>&gt;(&amp;mut self, state: S) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p>Inserts a specific <a href="../state/struct.State.html" title="struct bevy_state::state::State"><code>State</code></a> to the current <a href="../../bevy_app/app/struct.App.html" title="struct bevy_app::app::App"><code>App</code></a> and overrides any <a href="../state/struct.State.html" title="struct bevy_state::state::State"><code>State</code></a> previously
added of the same type.</p>
<p>Adds <a href="../state/struct.State.html" title="struct bevy_state::state::State"><code>State&lt;S&gt;</code></a> and <a href="../state/enum.NextState.html" title="enum bevy_state::state::NextState"><code>NextState&lt;S&gt;</code></a> resources, and enables use of the <a href="../state/struct.OnEnter.html" title="struct bevy_state::state::OnEnter"><code>OnEnter</code></a>,
<a href="../state/struct.OnTransition.html" title="struct bevy_state::state::OnTransition"><code>OnTransition</code></a> and <a href="../state/struct.OnExit.html" title="struct bevy_state::state::OnExit"><code>OnExit</code></a> schedules.
These schedules are triggered before <a href="../../bevy_app/main_schedule/struct.Update.html" title="struct bevy_app::main_schedule::Update"><code>Update</code></a> and at startup.</p>
<p>If you would like to control how other systems run based on the current state, you can
emulate this behavior using the <a href="../condition/fn.in_state.html" title="fn bevy_state::condition::in_state"><code>in_state</code></a> <a href="../../bevy_ecs/schedule/condition/trait.Condition.html" title="trait bevy_ecs::schedule::condition::Condition"><code>Condition</code></a>.</p>
<p>Note that you can also apply state transitions at other points in the schedule
by triggering the <a href="../state/struct.StateTransition.html" title="struct bevy_state::state::StateTransition"><code>StateTransition</code></a> schedule manually.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.add_computed_state" class="method"><a class="src rightside" href="../../src/bevy_state/app.rs.html#52">Source</a><h4 class="code-header">fn <a href="#tymethod.add_computed_state" class="fn">add_computed_state</a>&lt;S: <a class="trait" href="../state/trait.ComputedStates.html" title="trait bevy_state::state::ComputedStates">ComputedStates</a>&gt;(&amp;mut self) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p>Sets up a type implementing <a href="../state/trait.ComputedStates.html" title="trait bevy_state::state::ComputedStates"><code>ComputedStates</code></a>.</p>
<p>This method is idempotent: it has no effect when called again using the same generic type.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.add_sub_state" class="method"><a class="src rightside" href="../../src/bevy_state/app.rs.html#57">Source</a><h4 class="code-header">fn <a href="#tymethod.add_sub_state" class="fn">add_sub_state</a>&lt;S: <a class="trait" href="../state/trait.SubStates.html" title="trait bevy_state::state::SubStates">SubStates</a>&gt;(&amp;mut self) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p>Sets up a type implementing <a href="../state/trait.SubStates.html" title="trait bevy_state::state::SubStates"><code>SubStates</code></a>.</p>
<p>This method is idempotent: it has no effect when called again using the same generic type.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.enable_state_scoped_entities" class="method"><a class="src rightside" href="../../src/bevy_state/app.rs.html#62">Source</a><h4 class="code-header">fn <a href="#tymethod.enable_state_scoped_entities" class="fn">enable_state_scoped_entities</a>&lt;S: <a class="trait" href="../state/trait.States.html" title="trait bevy_state::state::States">States</a>&gt;(&amp;mut self) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p>Enable state-scoped entity clearing for state <code>S</code>.</p>
<p>For more information refer to <a href="../state_scoped/struct.StateScoped.html" title="struct bevy_state::state_scoped::StateScoped"><code>StateScoped</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.register_type_state" class="method"><a class="src rightside" href="../../src/bevy_state/app.rs.html#69-71">Source</a><h4 class="code-header">fn <a href="#tymethod.register_type_state" class="fn">register_type_state</a>&lt;S&gt;(&amp;mut self) -&gt; &amp;mut Self<div class="where">where
S: <a class="trait" href="../state/trait.States.html" title="trait bevy_state::state::States">States</a> + <a class="trait" href="../../bevy_reflect/from_reflect/trait.FromReflect.html" title="trait bevy_reflect::from_reflect::FromReflect">FromReflect</a> + <a class="trait" href="../../bevy_reflect/type_registry/trait.GetTypeRegistration.html" title="trait bevy_reflect::type_registry::GetTypeRegistration">GetTypeRegistration</a> + <a class="trait" href="../../bevy_reflect/type_info/trait.Typed.html" title="trait bevy_reflect::type_info::Typed">Typed</a>,</div></h4></section></summary><div class="docblock"><p>Registers the state type <code>T</code> using <a href="../../bevy_app/app/struct.App.html#method.register_type" title="method bevy_app::app::App::register_type"><code>App::register_type</code></a>,
and adds <a href="../reflect/struct.ReflectState.html" title="struct bevy_state::reflect::ReflectState"><code>ReflectState</code></a> type data to <code>T</code> in the type registry.</p>
<p>This enables reflection code to access the state. For detailed information, see the docs on <a href="../reflect/struct.ReflectState.html" title="struct bevy_state::reflect::ReflectState"><code>crate::reflect::ReflectState</code></a> .</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.register_type_mutable_state" class="method"><a class="src rightside" href="../../src/bevy_state/app.rs.html#79-81">Source</a><h4 class="code-header">fn <a href="#tymethod.register_type_mutable_state" class="fn">register_type_mutable_state</a>&lt;S&gt;(&amp;mut self) -&gt; &amp;mut Self<div class="where">where
S: <a class="trait" href="../state/trait.FreelyMutableState.html" title="trait bevy_state::state::FreelyMutableState">FreelyMutableState</a> + <a class="trait" href="../../bevy_reflect/from_reflect/trait.FromReflect.html" title="trait bevy_reflect::from_reflect::FromReflect">FromReflect</a> + <a class="trait" href="../../bevy_reflect/type_registry/trait.GetTypeRegistration.html" title="trait bevy_reflect::type_registry::GetTypeRegistration">GetTypeRegistration</a> + <a class="trait" href="../../bevy_reflect/type_info/trait.Typed.html" title="trait bevy_reflect::type_info::Typed">Typed</a>,</div></h4></section></summary><div class="docblock"><p>Registers the state type <code>T</code> using <a href="../../bevy_app/app/struct.App.html#method.register_type" title="method bevy_app::app::App::register_type"><code>App::register_type</code></a>,
and adds <a href="../reflect/struct.ReflectState.html" title="struct bevy_state::reflect::ReflectState"><code>crate::reflect::ReflectState</code></a> and <a href="../reflect/struct.ReflectFreelyMutableState.html" title="struct bevy_state::reflect::ReflectFreelyMutableState"><code>crate::reflect::ReflectFreelyMutableState</code></a> type data to <code>T</code> in the type registry.</p>
<p>This enables reflection code to access and modify the state.
For detailed information, see the docs on <a href="../reflect/struct.ReflectState.html" title="struct bevy_state::reflect::ReflectState"><code>crate::reflect::ReflectState</code></a> and <a href="../reflect/struct.ReflectFreelyMutableState.html" title="struct bevy_state::reflect::ReflectFreelyMutableState"><code>crate::reflect::ReflectFreelyMutableState</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-AppExtStates-for-App" class="impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#240-283">Source</a><a href="#impl-AppExtStates-for-App" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AppExtStates.html" title="trait bevy_state::app::AppExtStates">AppExtStates</a> for <a class="struct" href="../../bevy_app/app/struct.App.html" title="struct bevy_app::app::App">App</a></h3></section></summary><div class="impl-items"><section id="method.init_state" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#241-244">Source</a><a href="#method.init_state" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.init_state" class="fn">init_state</a>&lt;S: <a class="trait" href="../state/trait.FreelyMutableState.html" title="trait bevy_state::state::FreelyMutableState">FreelyMutableState</a> + <a class="trait" href="../../bevy_ecs/world/trait.FromWorld.html" title="trait bevy_ecs::world::FromWorld">FromWorld</a>&gt;(&amp;mut self) -&gt; &amp;mut Self</h4></section><section id="method.insert_state" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#246-249">Source</a><a href="#method.insert_state" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.insert_state" class="fn">insert_state</a>&lt;S: <a class="trait" href="../state/trait.FreelyMutableState.html" title="trait bevy_state::state::FreelyMutableState">FreelyMutableState</a>&gt;(&amp;mut self, state: S) -&gt; &amp;mut Self</h4></section><section id="method.add_computed_state" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#251-254">Source</a><a href="#method.add_computed_state" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.add_computed_state" class="fn">add_computed_state</a>&lt;S: <a class="trait" href="../state/trait.ComputedStates.html" title="trait bevy_state::state::ComputedStates">ComputedStates</a>&gt;(&amp;mut self) -&gt; &amp;mut Self</h4></section><section id="method.add_sub_state" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#256-259">Source</a><a href="#method.add_sub_state" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.add_sub_state" class="fn">add_sub_state</a>&lt;S: <a class="trait" href="../state/trait.SubStates.html" title="trait bevy_state::state::SubStates">SubStates</a>&gt;(&amp;mut self) -&gt; &amp;mut Self</h4></section><section id="method.enable_state_scoped_entities" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#261-264">Source</a><a href="#method.enable_state_scoped_entities" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.enable_state_scoped_entities" class="fn">enable_state_scoped_entities</a>&lt;S: <a class="trait" href="../state/trait.States.html" title="trait bevy_state::state::States">States</a>&gt;(&amp;mut self) -&gt; &amp;mut Self</h4></section><section id="method.register_type_state" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#267-273">Source</a><a href="#method.register_type_state" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.register_type_state" class="fn">register_type_state</a>&lt;S&gt;(&amp;mut self) -&gt; &amp;mut Self<div class="where">where
S: <a class="trait" href="../state/trait.States.html" title="trait bevy_state::state::States">States</a> + <a class="trait" href="../../bevy_reflect/from_reflect/trait.FromReflect.html" title="trait bevy_reflect::from_reflect::FromReflect">FromReflect</a> + <a class="trait" href="../../bevy_reflect/type_registry/trait.GetTypeRegistration.html" title="trait bevy_reflect::type_registry::GetTypeRegistration">GetTypeRegistration</a> + <a class="trait" href="../../bevy_reflect/type_info/trait.Typed.html" title="trait bevy_reflect::type_info::Typed">Typed</a>,</div></h4></section><section id="method.register_type_mutable_state" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#276-282">Source</a><a href="#method.register_type_mutable_state" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.register_type_mutable_state" class="fn">register_type_mutable_state</a>&lt;S&gt;(&amp;mut self) -&gt; &amp;mut Self<div class="where">where
S: <a class="trait" href="../state/trait.FreelyMutableState.html" title="trait bevy_state::state::FreelyMutableState">FreelyMutableState</a> + <a class="trait" href="../../bevy_reflect/from_reflect/trait.FromReflect.html" title="trait bevy_reflect::from_reflect::FromReflect">FromReflect</a> + <a class="trait" href="../../bevy_reflect/type_registry/trait.GetTypeRegistration.html" title="trait bevy_reflect::type_registry::GetTypeRegistration">GetTypeRegistration</a> + <a class="trait" href="../../bevy_reflect/type_info/trait.Typed.html" title="trait bevy_reflect::type_info::Typed">Typed</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AppExtStates-for-SubApp" class="impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#91-238">Source</a><a href="#impl-AppExtStates-for-SubApp" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AppExtStates.html" title="trait bevy_state::app::AppExtStates">AppExtStates</a> for <a class="struct" href="../../bevy_app/sub_app/struct.SubApp.html" title="struct bevy_app::sub_app::SubApp">SubApp</a></h3></section></summary><div class="impl-items"><section id="method.init_state-1" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#92-113">Source</a><a href="#method.init_state-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.init_state" class="fn">init_state</a>&lt;S: <a class="trait" href="../state/trait.FreelyMutableState.html" title="trait bevy_state::state::FreelyMutableState">FreelyMutableState</a> + <a class="trait" href="../../bevy_ecs/world/trait.FromWorld.html" title="trait bevy_ecs::world::FromWorld">FromWorld</a>&gt;(&amp;mut self) -&gt; &amp;mut Self</h4></section><section id="method.insert_state-1" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#115-142">Source</a><a href="#method.insert_state-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.insert_state" class="fn">insert_state</a>&lt;S: <a class="trait" href="../state/trait.FreelyMutableState.html" title="trait bevy_state::state::FreelyMutableState">FreelyMutableState</a>&gt;(&amp;mut self, state: S) -&gt; &amp;mut Self</h4></section><section id="method.add_computed_state-1" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#144-169">Source</a><a href="#method.add_computed_state-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.add_computed_state" class="fn">add_computed_state</a>&lt;S: <a class="trait" href="../state/trait.ComputedStates.html" title="trait bevy_state::state::ComputedStates">ComputedStates</a>&gt;(&amp;mut self) -&gt; &amp;mut Self</h4></section><section id="method.add_sub_state-1" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#171-197">Source</a><a href="#method.add_sub_state-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.add_sub_state" class="fn">add_sub_state</a>&lt;S: <a class="trait" href="../state/trait.SubStates.html" title="trait bevy_state::state::SubStates">SubStates</a>&gt;(&amp;mut self) -&gt; &amp;mut Self</h4></section><section id="method.enable_state_scoped_entities-1" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#199-213">Source</a><a href="#method.enable_state_scoped_entities-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.enable_state_scoped_entities" class="fn">enable_state_scoped_entities</a>&lt;S: <a class="trait" href="../state/trait.States.html" title="trait bevy_state::state::States">States</a>&gt;(&amp;mut self) -&gt; &amp;mut Self</h4></section><section id="method.register_type_state-1" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#216-224">Source</a><a href="#method.register_type_state-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.register_type_state" class="fn">register_type_state</a>&lt;S&gt;(&amp;mut self) -&gt; &amp;mut Self<div class="where">where
S: <a class="trait" href="../state/trait.States.html" title="trait bevy_state::state::States">States</a> + <a class="trait" href="../../bevy_reflect/from_reflect/trait.FromReflect.html" title="trait bevy_reflect::from_reflect::FromReflect">FromReflect</a> + <a class="trait" href="../../bevy_reflect/type_registry/trait.GetTypeRegistration.html" title="trait bevy_reflect::type_registry::GetTypeRegistration">GetTypeRegistration</a> + <a class="trait" href="../../bevy_reflect/type_info/trait.Typed.html" title="trait bevy_reflect::type_info::Typed">Typed</a>,</div></h4></section><section id="method.register_type_mutable_state-1" class="method trait-impl"><a class="src rightside" href="../../src/bevy_state/app.rs.html#227-237">Source</a><a href="#method.register_type_mutable_state-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.register_type_mutable_state" class="fn">register_type_mutable_state</a>&lt;S&gt;(&amp;mut self) -&gt; &amp;mut Self<div class="where">where
S: <a class="trait" href="../state/trait.FreelyMutableState.html" title="trait bevy_state::state::FreelyMutableState">FreelyMutableState</a> + <a class="trait" href="../../bevy_reflect/from_reflect/trait.FromReflect.html" title="trait bevy_reflect::from_reflect::FromReflect">FromReflect</a> + <a class="trait" href="../../bevy_reflect/type_registry/trait.GetTypeRegistration.html" title="trait bevy_reflect::type_registry::GetTypeRegistration">GetTypeRegistration</a> + <a class="trait" href="../../bevy_reflect/type_info/trait.Typed.html" title="trait bevy_reflect::type_info::Typed">Typed</a>,</div></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/bevy_state/app/trait.AppExtStates.js" data-ignore-extern-crates="bevy_app" async></script></section></div></main></body></html>