pub enum IfMode {
Render,
Hide,
}Expand description
<if mode="..."> policy. Render despawn/respawns the subtree on
each transition (default; cheap state-wise but loses focus / scroll
/ per-row signals across show/hide). Hide mounts once and toggles
Visible(bool) on every descendant, preserving state.
Variants§
Render
Despawn the body on falsy -> truthy -> despawn each transition.
Hide
Mount once; toggle Visible on falsy / truthy.
Trait Implementations§
Source§impl From<IfModeSpec> for IfMode
impl From<IfModeSpec> for IfMode
Source§fn from(s: IfModeSpec) -> Self
fn from(s: IfModeSpec) -> Self
Converts to this type from the input type.
impl Copy for IfMode
impl Eq for IfMode
impl StructuralPartialEq for IfMode
Auto Trait Implementations§
impl Freeze for IfMode
impl RefUnwindSafe for IfMode
impl Send for IfMode
impl Sync for IfMode
impl Unpin for IfMode
impl UnsafeUnpin for IfMode
impl UnwindSafe for IfMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> FromTemplate for T
impl<T> FromTemplate for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
Uses this template and the given
entity context to produce a [Template::Output].§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clones this template. See
Clone.