pub struct DocumentOrder(pub u32);Expand description
Position of this entity in the document, as a depth-first index over
the tree. It is the tiebreak for focus cycling: bevy_ecs 0.19’s
Entity: Ord is a niche-optimized row-index comparison, not a
spawn-order one - for entities recycled through a freed ECS row, a
later-spawned entity can sort before an earlier one. Entities with
equal TabIndex cycle in the order they appear in the source, not
in whatever order their table rows landed.
lumen_scene::spawn seeds it from a counter as it walks the parsed
tree, then restates it from the live hierarchy whenever the tree
changes shape. The restatement is what keeps it a position: a
subtree that mounts at runtime (an <if> body, a <for> row) would
otherwise carry a number that says only how late it arrived.
Absent on entities not spawned through lumenc (hand-built ECS test
fixtures, primarily) - consumers should treat a missing value as “no
preference” and fall back to Entity ordering for those.
Tuple Fields§
§0: u32Trait Implementations§
Source§impl Clone for DocumentOrder
impl Clone for DocumentOrder
Source§fn clone(&self) -> DocumentOrder
fn clone(&self) -> DocumentOrder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Component for DocumentOrder
impl Component for DocumentOrder
Source§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
Source§type Mutability = Mutable
type Mutability = Mutable
Component<Mutability = Mutable>,
while immutable components will instead have Component<Mutability = Immutable>. Read moreSource§fn register_required_components(
_requiree: ComponentId,
required_components: &mut RequiredComponentsRegistrator<'_, '_>,
)
fn register_required_components( _requiree: ComponentId, required_components: &mut RequiredComponentsRegistrator<'_, '_>, )
Source§fn clone_behavior() -> ComponentCloneBehavior
fn clone_behavior() -> ComponentCloneBehavior
Source§fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
ComponentRelationshipAccessor] required for working with relationships in dynamic contexts. Read more§fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
§fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
§fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
EntityMapper. This is used to remap entities in contexts like scenes and entity cloning.
When deriving Component, this is populated by annotating fields containing entities with #[entities] Read moreSource§impl Debug for DocumentOrder
impl Debug for DocumentOrder
Source§impl Ord for DocumentOrder
impl Ord for DocumentOrder
Source§fn cmp(&self, other: &DocumentOrder) -> Ordering
fn cmp(&self, other: &DocumentOrder) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DocumentOrder
impl PartialEq for DocumentOrder
Source§fn eq(&self, other: &DocumentOrder) -> bool
fn eq(&self, other: &DocumentOrder) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DocumentOrder
impl PartialOrd for DocumentOrder
impl Copy for DocumentOrder
impl Eq for DocumentOrder
impl StructuralPartialEq for DocumentOrder
Auto Trait Implementations§
impl Freeze for DocumentOrder
impl RefUnwindSafe for DocumentOrder
impl Send for DocumentOrder
impl Sync for DocumentOrder
impl Unpin for DocumentOrder
impl UnsafeUnpin for DocumentOrder
impl UnwindSafe for DocumentOrder
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
§impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut ComponentsRegistrator<'_>, ) -> impl Iterator<Item = ComponentId> + use<C>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
§unsafe fn get_components(
ptr: MovingPtr<'_, C>,
func: &mut impl FnMut(StorageType, OwningPtr<'_>),
) -> <C as DynamicBundle>::Effect
unsafe fn get_components( ptr: MovingPtr<'_, C>, func: &mut impl FnMut(StorageType, OwningPtr<'_>), ) -> <C as DynamicBundle>::Effect
§unsafe fn apply_effect(
_ptr: MovingPtr<'_, MaybeUninit<C>>,
_entity: &mut EntityWorldMut<'_>,
)
unsafe fn apply_effect( _ptr: MovingPtr<'_, MaybeUninit<C>>, _entity: &mut EntityWorldMut<'_>, )
§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
key and return true if they are equal.