repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/error/bevy_error.rs
crates/bevy_ecs/src/error/bevy_error.rs
use alloc::boxed::Box; use core::{ error::Error, fmt::{Debug, Display}, }; /// The built in "universal" Bevy error type. This has a blanket [`From`] impl for any type that implements Rust's [`Error`], /// meaning it can be used as a "catch all" error. /// /// # Backtraces /// /// When used with the `backtrace`...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/error/mod.rs
crates/bevy_ecs/src/error/mod.rs
//! Error handling for Bevy systems, commands, and observers. //! //! When a system is added to a [`Schedule`], and its return type is that of [`Result`], then Bevy //! considers those systems to be "fallible", and the ECS scheduler will special-case the [`Err`] //! variant of the returned `Result`. //! //! All [`BevyE...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/error/command_handling.rs
crates/bevy_ecs/src/error/command_handling.rs
use core::fmt; use bevy_utils::prelude::DebugName; use crate::{ entity::Entity, never::Never, system::{entity_command::EntityCommandError, Command, EntityCommand}, world::{error::EntityMutableFetchError, World}, }; use super::{BevyError, ErrorContext, ErrorHandler}; /// Takes a [`Command`] that pote...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/error/handler.rs
crates/bevy_ecs/src/error/handler.rs
use core::fmt::Display; use crate::{change_detection::Tick, error::BevyError, prelude::Resource}; use bevy_utils::prelude::DebugName; use derive_more::derive::{Deref, DerefMut}; /// Context for a [`BevyError`] to aid in debugging. #[derive(Debug, PartialEq, Eq, Clone)] pub enum ErrorContext { /// The error occurr...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/observer/runner.rs
crates/bevy_ecs/src/observer/runner.rs
//! Logic for evaluating observers, and storing functions inside of observers. use core::any::Any; use crate::{ error::ErrorContext, event::Event, observer::TriggerContext, prelude::*, query::DebugCheckedUnwrap, system::{ObserverSystem, RunSystemError}, world::DeferredWorld, }; use bevy_pt...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/observer/distributed_storage.rs
crates/bevy_ecs/src/observer/distributed_storage.rs
//! Information about observers that is stored on the entities themselves. //! //! This allows for easier cleanup, better inspection, and more flexible querying. //! //! Each observer is associated with an entity, defined by the [`Observer`] component. //! The [`Observer`] component contains the system that will be run...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/observer/mod.rs
crates/bevy_ecs/src/observer/mod.rs
//! Observers are a push-based tool for responding to [`Event`]s. The [`Observer`] component holds a [`System`] that runs whenever a matching [`Event`] //! is triggered. //! //! See [`Event`] and [`Observer`] for in-depth documentation and usage examples. mod centralized_storage; mod distributed_storage; mod entity_cl...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/observer/system_param.rs
crates/bevy_ecs/src/observer/system_param.rs
//! System parameters for working with observers. use crate::{ bundle::Bundle, change_detection::MaybeLocation, event::{Event, EventKey, PropagateEntityTrigger}, prelude::*, traversal::Traversal, }; use bevy_ptr::Ptr; use core::{ fmt::Debug, marker::PhantomData, ops::{Deref, DerefMut}, ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/observer/entity_cloning.rs
crates/bevy_ecs/src/observer/entity_cloning.rs
//! Logic to track observers when cloning entities. use crate::{ component::ComponentCloneBehavior, entity::{ CloneByFilter, ComponentCloneCtx, EntityClonerBuilder, EntityMapper, SourceComponent, }, observer::ObservedBy, world::World, }; use super::Observer; impl<Filter: CloneByFilter> En...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/observer/centralized_storage.rs
crates/bevy_ecs/src/observer/centralized_storage.rs
//! Centralized storage for observers, allowing for efficient look-ups. //! //! This has multiple levels: //! - [`World::observers`](crate::world::World::observers) provides access to [`Observers`], which is a central storage for all observers. //! - [`Observers`] contains multiple distinct caches in the form of [`Cach...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/relationship/relationship_query.rs
crates/bevy_ecs/src/relationship/relationship_query.rs
use crate::{ entity::Entity, query::{QueryData, QueryFilter}, relationship::{Relationship, RelationshipTarget}, system::Query, }; use alloc::collections::VecDeque; use smallvec::SmallVec; use super::SourceIter; impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> { /// If the given `enti...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/relationship/related_methods.rs
crates/bevy_ecs/src/relationship/related_methods.rs
use crate::{ bundle::Bundle, entity::{hash_set::EntityHashSet, Entity}, prelude::Children, relationship::{ Relationship, RelationshipHookMode, RelationshipSourceCollection, RelationshipTarget, }, system::{Commands, EntityCommands}, world::{DeferredWorld, EntityWorldMut, World}, }; us...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/relationship/mod.rs
crates/bevy_ecs/src/relationship/mod.rs
//! This module provides functionality to link entities to each other using specialized components called "relationships". See the [`Relationship`] trait for more info. mod related_methods; mod relationship_query; mod relationship_source_collection; use alloc::boxed::Box; use bevy_ptr::Ptr; use core::marker::PhantomD...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/relationship/relationship_source_collection.rs
crates/bevy_ecs/src/relationship/relationship_source_collection.rs
use alloc::collections::{btree_set, BTreeSet}; use core::{ hash::BuildHasher, ops::{Deref, DerefMut}, }; use crate::entity::{Entity, EntityHashSet, EntityIndexSet}; use alloc::vec::Vec; use indexmap::IndexSet; use smallvec::SmallVec; /// The internal [`Entity`] collection used by a [`RelationshipTarget`](crat...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/command_queue.rs
crates/bevy_ecs/src/world/command_queue.rs
use crate::{ change_detection::MaybeLocation, system::{Command, SystemBuffer, SystemMeta}, world::{DeferredWorld, World}, }; use alloc::{boxed::Box, vec::Vec}; use bevy_ptr::{OwningPtr, Unaligned}; use core::{ fmt::Debug, mem::{size_of, MaybeUninit}, panic::AssertUnwindSafe, ptr::{addr_of_m...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/reflect.rs
crates/bevy_ecs/src/world/reflect.rs
//! Provides additional functionality for [`World`] when the `bevy_reflect` feature is enabled. use core::any::TypeId; use thiserror::Error; use bevy_reflect::{Reflect, ReflectFromPtr}; use bevy_utils::prelude::DebugName; use crate::{prelude::*, world::ComponentId}; impl World { /// Retrieves a reference to th...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/spawn_batch.rs
crates/bevy_ecs/src/world/spawn_batch.rs
use bevy_ptr::move_as_ptr; use crate::{ bundle::{Bundle, BundleSpawner, NoBundleEffect}, change_detection::MaybeLocation, entity::{AllocEntitiesIterator, Entity, EntitySetIterator}, world::World, }; use core::iter::FusedIterator; /// An iterator that spawns a series of entities and returns the [ID](En...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/entity_fetch.rs
crates/bevy_ecs/src/world/entity_fetch.rs
use alloc::vec::Vec; use core::mem::MaybeUninit; use crate::{ entity::{Entity, EntityHashMap, EntityHashSet, EntityNotSpawnedError}, error::Result, world::{ error::EntityMutableFetchError, unsafe_world_cell::UnsafeWorldCell, EntityMut, EntityRef, EntityWorldMut, }, }; /// Provides a sa...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/unsafe_world_cell.rs
crates/bevy_ecs/src/world/unsafe_world_cell.rs
//! Contains types that allow disjoint mutable access to a [`World`]. use super::{Mut, Ref, World, WorldId}; use crate::{ archetype::{Archetype, Archetypes}, bundle::Bundles, change_detection::{ ComponentTickCells, ComponentTicks, ComponentTicksMut, ComponentTicksRef, MaybeLocation, MutUnty...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/error.rs
crates/bevy_ecs/src/world/error.rs
//! Contains error types returned by bevy's schedule. use alloc::vec::Vec; use bevy_utils::prelude::DebugName; use crate::{ component::ComponentId, entity::{Entity, EntityNotSpawnedError}, schedule::InternedScheduleLabel, }; /// The error type returned by [`World::try_run_schedule`] if the provided sched...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/identifier.rs
crates/bevy_ecs/src/world/identifier.rs
use crate::{ change_detection::Tick, query::FilteredAccessSet, storage::SparseSetIndex, system::{ExclusiveSystemParam, ReadOnlySystemParam, SystemMeta, SystemParam}, world::{FromWorld, World}, }; use bevy_platform::sync::atomic::{AtomicUsize, Ordering}; use super::unsafe_world_cell::UnsafeWorldCell...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/mod.rs
crates/bevy_ecs/src/world/mod.rs
#![expect( unsafe_op_in_unsafe_fn, reason = "See #11590. To be removed once all applicable unsafe code has an unsafe block with a safety comment." )] //! Defines the [`World`] and APIs for accessing it directly. pub(crate) mod command_queue; mod deferred_world; mod entity_access; mod entity_fetch; mod filtere...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/deferred_world.rs
crates/bevy_ecs/src/world/deferred_world.rs
use core::ops::Deref; use bevy_utils::prelude::DebugName; use crate::{ archetype::Archetype, change_detection::{MaybeLocation, MutUntyped}, component::{ComponentId, Mutable}, entity::Entity, event::{EntityComponentsTrigger, Event, EventKey, Trigger}, lifecycle::{HookContext, Insert, Replace, I...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/filtered_resource.rs
crates/bevy_ecs/src/world/filtered_resource.rs
use crate::{ change_detection::{ComponentTicksMut, ComponentTicksRef, Mut, MutUntyped, Ref, Tick}, component::ComponentId, query::Access, resource::Resource, world::{unsafe_world_cell::UnsafeWorldCell, World}, }; use bevy_ptr::Ptr; use super::error::ResourceFetchError; /// Provides read-only acces...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/entity_access/world_mut.rs
crates/bevy_ecs/src/world/entity_access/world_mut.rs
use crate::{ archetype::Archetype, bundle::{ Bundle, BundleFromComponents, BundleInserter, BundleRemover, DynamicBundle, InsertMode, }, change_detection::{ComponentTicks, MaybeLocation, MutUntyped, Tick}, component::{Component, ComponentId, Components, Mutable, StorageType}, entity::{Ent...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/entity_access/entity_ref.rs
crates/bevy_ecs/src/world/entity_access/entity_ref.rs
use crate::{ archetype::Archetype, change_detection::{ComponentTicks, MaybeLocation, Tick}, component::{Component, ComponentId}, entity::{ContainsEntity, Entity, EntityEquivalent, EntityLocation}, query::{Access, QueryAccessError, ReadOnlyQueryData, ReleaseStateQueryData}, world::{ error...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/entity_access/entity_mut.rs
crates/bevy_ecs/src/world/entity_access/entity_mut.rs
use crate::{ archetype::Archetype, change_detection::{ComponentTicks, MaybeLocation, Tick}, component::{Component, ComponentId, Mutable}, entity::{ContainsEntity, Entity, EntityEquivalent, EntityLocation}, query::{has_conflicts, Access, QueryAccessError, ReadOnlyQueryData, ReleaseStateQueryData}, ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/entity_access/except.rs
crates/bevy_ecs/src/world/entity_access/except.rs
use crate::{ bundle::Bundle, change_detection::{ComponentTicks, MaybeLocation, MutUntyped, Tick}, component::{Component, ComponentId, Components, Mutable}, entity::{ContainsEntity, Entity, EntityEquivalent}, query::Access, world::{ unsafe_world_cell::UnsafeEntityCell, DynamicComponentFet...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/entity_access/filtered.rs
crates/bevy_ecs/src/world/entity_access/filtered.rs
use crate::{ archetype::Archetype, change_detection::{ComponentTicks, MaybeLocation, MutUntyped, Tick}, component::{Component, ComponentId, Mutable}, entity::{ContainsEntity, Entity, EntityEquivalent, EntityLocation}, query::Access, world::{unsafe_world_cell::UnsafeEntityCell, EntityMut, EntityR...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/entity_access/mod.rs
crates/bevy_ecs/src/world/entity_access/mod.rs
mod component_fetch; mod entity_mut; mod entity_ref; mod entry; mod except; mod filtered; mod world_mut; pub use component_fetch::*; pub use entity_mut::*; pub use entity_ref::*; pub use entry::*; pub use except::*; pub use filtered::*; pub use world_mut::*; #[cfg(test)] mod tests { use alloc::{vec, vec::Vec}; ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/entity_access/component_fetch.rs
crates/bevy_ecs/src/world/entity_access/component_fetch.rs
use crate::{ change_detection::MutUntyped, component::ComponentId, world::{error::EntityComponentError, unsafe_world_cell::UnsafeEntityCell}, }; use alloc::vec::Vec; use bevy_platform::collections::{HashMap, HashSet}; use bevy_ptr::Ptr; use core::mem::MaybeUninit; /// Types that can be used to fetch compo...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/world/entity_access/entry.rs
crates/bevy_ecs/src/world/entity_access/entry.rs
use crate::{ component::{Component, Mutable}, world::{EntityWorldMut, Mut}, }; use core::marker::PhantomData; /// A view into a single entity and component in a world, which may either be vacant or occupied. /// /// This `enum` can only be constructed from the [`entry`] method on [`EntityWorldMut`]. /// /// [...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/config.rs
crates/bevy_ecs/src/schedule/config.rs
use alloc::{boxed::Box, vec, vec::Vec}; use variadics_please::all_tuples; use crate::{ schedule::{ auto_insert_apply_deferred::IgnoreDeferred, condition::{BoxedCondition, SystemCondition}, graph::{Ambiguity, Dependency, DependencyKind, GraphInfo}, set::{InternedSystemSet, IntoSystem...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/node.rs
crates/bevy_ecs/src/schedule/node.rs
use alloc::{boxed::Box, collections::BTreeSet, string::String, vec::Vec}; use core::{ any::TypeId, fmt::{self, Debug}, ops::{Deref, Index, IndexMut, Range}, }; use bevy_platform::collections::{HashMap, HashSet}; use bevy_utils::prelude::DebugName; use slotmap::{new_key_type, Key, KeyData, SecondaryMap, Slo...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/schedule.rs
crates/bevy_ecs/src/schedule/schedule.rs
#![expect( clippy::module_inception, reason = "This instance of module inception is being discussed; see #17344." )] use alloc::{ boxed::Box, collections::BTreeSet, format, string::{String, ToString}, vec, vec::Vec, }; use bevy_platform::{ collections::{HashMap, HashSet}, hash::F...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/error.rs
crates/bevy_ecs/src/schedule/error.rs
use alloc::{format, string::String, vec::Vec}; use core::fmt::Write as _; use thiserror::Error; use crate::{ component::Components, schedule::{ graph::{ DagCrossDependencyError, DagOverlappingGroupError, DagRedundancyError, DiGraphToposortError, GraphNodeId, }, ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/mod.rs
crates/bevy_ecs/src/schedule/mod.rs
//! Contains APIs for ordering systems and executing them on a [`World`](crate::world::World) mod auto_insert_apply_deferred; mod condition; mod config; mod error; mod executor; mod node; mod pass; mod schedule; mod set; mod stepping; pub use self::graph::GraphInfo; pub use self::{condition::*, config::*, error::*, e...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/stepping.rs
crates/bevy_ecs/src/schedule/stepping.rs
use crate::{ resource::Resource, schedule::{InternedScheduleLabel, NodeId, Schedule, ScheduleLabel, SystemKey}, system::{IntoSystem, ResMut}, }; use alloc::vec::Vec; use bevy_platform::collections::HashMap; use bevy_utils::TypeIdMap; use core::any::TypeId; use fixedbitset::FixedBitSet; use log::{info, warn}...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/condition.rs
crates/bevy_ecs/src/schedule/condition.rs
use alloc::{boxed::Box, format}; use bevy_utils::prelude::DebugName; use core::ops::Not; use crate::system::{ Adapt, AdapterSystem, CombinatorSystem, Combine, IntoSystem, ReadOnlySystem, RunSystemError, System, SystemIn, SystemInput, }; /// A type-erased run condition stored in a [`Box`]. pub type BoxedCondit...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/auto_insert_apply_deferred.rs
crates/bevy_ecs/src/schedule/auto_insert_apply_deferred.rs
use alloc::{boxed::Box, collections::BTreeSet, vec::Vec}; use bevy_platform::{collections::HashMap, hash::FixedHasher}; use indexmap::IndexSet; use crate::{ schedule::{graph::Dag, SystemKey, SystemSetKey}, system::{IntoSystem, System}, world::World, }; use super::{ is_apply_deferred, ApplyDeferred, D...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/pass.rs
crates/bevy_ecs/src/schedule/pass.rs
use alloc::{boxed::Box, vec::Vec}; use core::{ any::{Any, TypeId}, fmt::Debug, }; use bevy_platform::hash::FixedHasher; use bevy_utils::TypeIdMap; use indexmap::IndexSet; use super::{DiGraph, NodeId, ScheduleBuildError, ScheduleGraph}; use crate::{ schedule::{graph::Dag, SystemKey, SystemSetKey}, worl...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/set.rs
crates/bevy_ecs/src/schedule/set.rs
use alloc::boxed::Box; use bevy_utils::prelude::DebugName; use core::{ any::TypeId, fmt::Debug, hash::{Hash, Hasher}, marker::PhantomData, }; pub use crate::label::DynEq; pub use bevy_ecs_macros::{ScheduleLabel, SystemSet}; use crate::{ define_label, intern::Interned, system::{ Exc...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/graph/graph_map.rs
crates/bevy_ecs/src/schedule/graph/graph_map.rs
//! `Graph<DIRECTED>` is a graph datastructure where node values are mapping //! keys. //! Based on the `GraphMap` datastructure from [`petgraph`]. //! //! [`petgraph`]: https://docs.rs/petgraph/0.6.5/petgraph/ use alloc::{vec, vec::Vec}; use core::{ fmt::{self, Debug}, hash::{BuildHasher, Hash}, }; use thiser...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/graph/dag.rs
crates/bevy_ecs/src/schedule/graph/dag.rs
use alloc::vec::Vec; use core::{ fmt::{self, Debug}, hash::{BuildHasher, Hash}, ops::{Deref, DerefMut}, }; use bevy_platform::{ collections::{HashMap, HashSet}, hash::FixedHasher, }; use fixedbitset::FixedBitSet; use indexmap::IndexSet; use thiserror::Error; use crate::{ error::Result, sch...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/graph/tarjan_scc.rs
crates/bevy_ecs/src/schedule/graph/tarjan_scc.rs
use alloc::vec::Vec; use core::{hash::BuildHasher, num::NonZeroUsize}; use smallvec::SmallVec; use crate::schedule::graph::{DiGraph, GraphNodeId}; /// Create an iterator over *strongly connected components* using Algorithm 3 in /// [A Space-Efficient Algorithm for Finding Strongly Connected Components][1] by David J...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/graph/mod.rs
crates/bevy_ecs/src/schedule/graph/mod.rs
use alloc::{boxed::Box, vec::Vec}; use core::{ any::{Any, TypeId}, fmt::Debug, }; use bevy_utils::TypeIdMap; use crate::schedule::InternedSystemSet; mod dag; mod graph_map; mod tarjan_scc; pub use dag::*; pub use graph_map::{DiGraph, DiGraphToposortError, Direction, GraphNodeId, UnGraph}; /// Specifies wha...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs
crates/bevy_ecs/src/schedule/executor/multi_threaded.rs
use alloc::{boxed::Box, vec::Vec}; use bevy_platform::cell::SyncUnsafeCell; use bevy_platform::sync::Arc; use bevy_tasks::{ComputeTaskPool, Scope, TaskPool, ThreadExecutor}; use concurrent_queue::ConcurrentQueue; use core::{any::Any, panic::AssertUnwindSafe}; use fixedbitset::FixedBitSet; #[cfg(feature = "std")] use st...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/executor/single_threaded.rs
crates/bevy_ecs/src/schedule/executor/single_threaded.rs
use core::panic::AssertUnwindSafe; use fixedbitset::FixedBitSet; #[cfg(feature = "trace")] use alloc::string::ToString as _; #[cfg(feature = "trace")] use tracing::info_span; #[cfg(feature = "std")] use std::eprintln; use crate::{ error::{ErrorContext, ErrorHandler}, schedule::{ is_apply_deferred, Co...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/schedule/executor/mod.rs
crates/bevy_ecs/src/schedule/executor/mod.rs
#[cfg(feature = "std")] mod multi_threaded; mod single_threaded; use alloc::{vec, vec::Vec}; use bevy_utils::prelude::DebugName; use core::any::TypeId; pub use self::single_threaded::SingleThreadedExecutor; #[cfg(feature = "std")] pub use self::multi_threaded::{MainThreadExecutor, MultiThreadedExecutor}; use fixedb...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/reflect/resource.rs
crates/bevy_ecs/src/reflect/resource.rs
//! Definitions for [`Resource`] reflection. //! //! # Architecture //! //! See the module doc for [`reflect::component`](`crate::reflect::component`). use crate::{ change_detection::Mut, component::ComponentId, resource::Resource, world::{ error::ResourceFetchError, unsafe_world_cell::UnsafeWo...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/reflect/event.rs
crates/bevy_ecs/src/reflect/event.rs
//! Definitions for [`Event`] reflection. //! This allows triggering events whose type is only known at runtime. //! //! This module exports two types: [`ReflectEventFns`] and [`ReflectEvent`]. //! //! Same as [`component`](`super::component`), but for events. use crate::{event::Event, reflect::from_reflect_with_fallb...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/reflect/bundle.rs
crates/bevy_ecs/src/reflect/bundle.rs
//! Definitions for [`Bundle`] reflection. //! This allows inserting, updating and/or removing bundles whose type is only known at runtime. //! //! This module exports two types: [`ReflectBundleFns`] and [`ReflectBundle`]. //! //! Same as [`component`](`super::component`), but for bundles. use alloc::boxed::Box; use be...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/reflect/entity_commands.rs
crates/bevy_ecs/src/reflect/entity_commands.rs
use crate::{ prelude::Mut, reflect::{AppTypeRegistry, ReflectBundle, ReflectComponent}, resource::Resource, system::EntityCommands, world::EntityWorldMut, }; use alloc::{borrow::Cow, boxed::Box}; use bevy_reflect::{PartialReflect, TypeRegistry}; /// An extension trait for [`EntityCommands`] for ref...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/reflect/from_world.rs
crates/bevy_ecs/src/reflect/from_world.rs
//! Definitions for [`FromWorld`] reflection. //! This allows creating instances of types that are known only at runtime and //! require an `&mut World` to be initialized. //! //! This module exports two types: [`ReflectFromWorldFns`] and [`ReflectFromWorld`]. //! //! Same as [`component`](`super::component`), but for ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/reflect/mod.rs
crates/bevy_ecs/src/reflect/mod.rs
//! Types that enable reflection support. use core::{ any::TypeId, ops::{Deref, DerefMut}, }; use crate::{resource::Resource, world::World}; use bevy_reflect::{ std_traits::ReflectDefault, PartialReflect, Reflect, ReflectFromReflect, TypePath, TypeRegistry, TypeRegistryArc, }; mod bundle; mod compone...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/reflect/map_entities.rs
crates/bevy_ecs/src/reflect/map_entities.rs
use crate::entity::{EntityMapper, MapEntities}; use bevy_reflect::{FromReflect, FromType, PartialReflect}; /// For a specific type of value, this maps any fields with values of type [`Entity`] to a new world. /// /// Since a given `Entity` ID is only valid for the world it came from, when performing deserialization //...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/reflect/component.rs
crates/bevy_ecs/src/reflect/component.rs
//! Definitions for [`Component`] reflection. //! This allows inserting, updating, removing and generally interacting with components //! whose types are only known at runtime. //! //! This module exports two types: [`ReflectComponentFns`] and [`ReflectComponent`]. //! //! # Architecture //! //! [`ReflectComponent`] wr...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/bundle/spawner.rs
crates/bevy_ecs/src/bundle/spawner.rs
use core::ptr::NonNull; use bevy_ptr::{ConstNonNull, MovingPtr}; use crate::{ archetype::{Archetype, ArchetypeCreated, ArchetypeId, SpawnBundleStatus}, bundle::{Bundle, BundleId, BundleInfo, DynamicBundle, InsertMode}, change_detection::{MaybeLocation, Tick}, entity::{Entity, EntityAllocator, EntityLo...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/bundle/tests.rs
crates/bevy_ecs/src/bundle/tests.rs
use crate::{ archetype::ArchetypeCreated, lifecycle::HookContext, prelude::*, world::DeferredWorld, }; #[derive(Component)] struct A; #[derive(Component)] #[component(on_add = a_on_add, on_insert = a_on_insert, on_replace = a_on_replace, on_remove = a_on_remove)] struct AMacroHooks; fn a_on_add(mut world: Deferr...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/bundle/insert.rs
crates/bevy_ecs/src/bundle/insert.rs
use alloc::vec::Vec; use bevy_ptr::{ConstNonNull, MovingPtr}; use core::ptr::NonNull; use crate::{ archetype::{ Archetype, ArchetypeAfterBundleInsert, ArchetypeCreated, ArchetypeId, Archetypes, ComponentStatus, }, bundle::{ArchetypeMoveType, Bundle, BundleId, BundleInfo, DynamicBundle, Inse...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/bundle/info.rs
crates/bevy_ecs/src/bundle/info.rs
use alloc::{boxed::Box, vec, vec::Vec}; use bevy_platform::{ collections::{HashMap, HashSet}, hash::FixedHasher, }; use bevy_ptr::{MovingPtr, OwningPtr}; use bevy_utils::TypeIdMap; use core::{any::TypeId, ptr::NonNull}; use indexmap::{IndexMap, IndexSet}; use crate::{ archetype::{Archetype, BundleComponent...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/bundle/mod.rs
crates/bevy_ecs/src/bundle/mod.rs
#![expect( unsafe_op_in_unsafe_fn, reason = "See #11590. To be removed once all applicable unsafe code has an unsafe block with a safety comment." )] //! Types for handling [`Bundle`]s. //! //! This module contains the [`Bundle`] trait and some other helper types. mod impls; mod info; mod insert; mod remove; ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/bundle/impls.rs
crates/bevy_ecs/src/bundle/impls.rs
use core::{any::TypeId, iter}; use bevy_ptr::{MovingPtr, OwningPtr}; use core::mem::MaybeUninit; use variadics_please::all_tuples_enumerated; use crate::{ bundle::{Bundle, BundleFromComponents, DynamicBundle, NoBundleEffect}, component::{Component, ComponentId, Components, ComponentsRegistrator, StorageType},...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/bundle/remove.rs
crates/bevy_ecs/src/bundle/remove.rs
use alloc::vec::Vec; use bevy_ptr::ConstNonNull; use core::ptr::NonNull; use crate::{ archetype::{Archetype, ArchetypeCreated, ArchetypeId, Archetypes}, bundle::{Bundle, BundleId, BundleInfo}, change_detection::MaybeLocation, component::{ComponentId, Components, StorageType}, entity::{Entity, Entit...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/change_detection/maybe_location.rs
crates/bevy_ecs/src/change_detection/maybe_location.rs
#[cfg(feature = "bevy_reflect")] use bevy_reflect::Reflect; use core::{ marker::PhantomData, ops::{Deref, DerefMut}, panic::Location, }; /// A value that contains a `T` if the `track_location` feature is enabled, /// and is a ZST if it is not. /// /// The overall API is similar to [`Option`], but whether t...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/change_detection/params.rs
crates/bevy_ecs/src/change_detection/params.rs
use crate::{ change_detection::{traits::*, ComponentTickCells, MaybeLocation, Tick}, ptr::PtrMut, resource::Resource, }; use bevy_ptr::{Ptr, UnsafeCellDeref}; use core::{ ops::{Deref, DerefMut}, panic::Location, }; /// Used by immutable query parameters (such as [`Ref`] and [`Res`]) /// to store im...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/change_detection/mod.rs
crates/bevy_ecs/src/change_detection/mod.rs
//! Types that detect when their internal data mutate. mod maybe_location; mod params; mod tick; mod traits; pub use maybe_location::MaybeLocation; pub use params::*; pub use tick::*; pub use traits::{DetectChanges, DetectChangesMut}; /// The (arbitrarily chosen) minimum number of world tick increments between `chec...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/change_detection/traits.rs
crates/bevy_ecs/src/change_detection/traits.rs
use crate::{change_detection::MaybeLocation, change_detection::Tick}; use alloc::borrow::ToOwned; use core::mem; /// Types that can read change detection information. /// This change detection is controlled by [`DetectChangesMut`] types such as [`ResMut`]. /// /// ## Example /// Using types that implement [`DetectChan...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/change_detection/tick.rs
crates/bevy_ecs/src/change_detection/tick.rs
use bevy_ecs_macros::Event; #[cfg(feature = "bevy_reflect")] use bevy_reflect::Reflect; use core::{cell::UnsafeCell, panic::Location}; use crate::change_detection::{MaybeLocation, MAX_CHANGE_AGE}; /// A value that tracks when a system ran relative to other systems. /// This is used to power change detection. /// /// ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/entity/clone_entities.rs
crates/bevy_ecs/src/entity/clone_entities.rs
#![expect( unsafe_op_in_unsafe_fn, reason = "See #11590. To be removed once all applicable unsafe code has an unsafe block with a safety comment." )] use crate::{ archetype::Archetype, bundle::{Bundle, BundleRemover, InsertMode}, change_detection::MaybeLocation, component::{Component, Component...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/entity/index_map.rs
crates/bevy_ecs/src/entity/index_map.rs
//! Contains the [`EntityIndexMap`] type, an [`IndexMap`] pre-configured to use [`EntityHash`] hashing. //! //! This module is a lightweight wrapper around `indexmap`'s [`IndexMap`] that is more performant for [`Entity`] keys. use core::{ cmp::Ordering, fmt::{self, Debug, Formatter}, hash::{BuildHasher, Ha...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/entity/entity_set.rs
crates/bevy_ecs/src/entity/entity_set.rs
use alloc::{ boxed::Box, collections::{btree_map, btree_set}, rc::Rc, }; use bevy_platform::collections::HashSet; use core::{ array, fmt::{Debug, Formatter}, hash::{BuildHasher, Hash}, iter::{self, FusedIterator}, option, result, }; use super::{Entity, UniqueEntityEquivalentSlice}; us...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/entity/unique_vec.rs
crates/bevy_ecs/src/entity/unique_vec.rs
//! A wrapper around entity [`Vec`]s with a uniqueness invariant. use core::{ borrow::{Borrow, BorrowMut}, mem::MaybeUninit, ops::{ Bound, Deref, DerefMut, Index, IndexMut, Range, RangeBounds, RangeFrom, RangeFull, RangeInclusive, RangeTo, RangeToInclusive, }, }; use alloc::{ borro...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/entity/hash_map.rs
crates/bevy_ecs/src/entity/hash_map.rs
//! Contains the [`EntityHashMap`] type, a [`HashMap`] pre-configured to use [`EntityHash`] hashing. //! //! This module is a lightweight wrapper around Bevy's [`HashMap`] that is more performant for [`Entity`] keys. use core::{ fmt::{self, Debug, Formatter}, iter::FusedIterator, marker::PhantomData, o...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/entity/hash_set.rs
crates/bevy_ecs/src/entity/hash_set.rs
//! Contains the [`EntityHashSet`] type, a [`HashSet`] pre-configured to use [`EntityHash`] hashing. //! //! This module is a lightweight wrapper around Bevy's [`HashSet`] that is more performant for [`Entity`] keys. use core::{ fmt::{self, Debug, Formatter}, iter::FusedIterator, marker::PhantomData, o...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/entity/mod.rs
crates/bevy_ecs/src/entity/mod.rs
//! This module contains all entity types and utilities for interacting with their ids. //! //! # What is an Entity? //! //! The ecs [docs](crate) give an overview of what entities are and generally how to use them. //! These docs provide more detail into how they actually work. //! In these docs [`Entity`] and "entity...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/entity/map_entities.rs
crates/bevy_ecs/src/entity/map_entities.rs
pub use bevy_ecs_macros::MapEntities; use indexmap::{IndexMap, IndexSet}; use crate::{ entity::{hash_map::EntityHashMap, Entity}, world::World, }; use alloc::{ collections::{BTreeMap, BTreeSet, VecDeque}, vec::Vec, }; use bevy_platform::collections::{HashMap, HashSet}; use core::{ hash::{BuildHash...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/entity/hash.rs
crates/bevy_ecs/src/entity/hash.rs
use core::hash::{BuildHasher, Hasher}; #[cfg(feature = "bevy_reflect")] use bevy_reflect::{std_traits::ReflectDefault, Reflect}; /// A [`BuildHasher`] that results in a [`EntityHasher`]. #[derive(Debug, Default, Clone)] #[cfg_attr(feature = "bevy_reflect", derive(Reflect), reflect(Default, Clone))] pub struct EntityH...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/entity/unique_slice.rs
crates/bevy_ecs/src/entity/unique_slice.rs
//! A wrapper around entity slices with a uniqueness invariant. use core::{ array::TryFromSliceError, borrow::Borrow, cmp::Ordering, fmt::Debug, iter::FusedIterator, ops::{ Bound, Deref, Index, IndexMut, Range, RangeFrom, RangeFull, RangeInclusive, RangeTo, RangeToInclusive, ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/entity/unique_array.rs
crates/bevy_ecs/src/entity/unique_array.rs
//! A wrapper around entity arrays with a uniqueness invariant. use core::{ array, borrow::{Borrow, BorrowMut}, fmt::Debug, ops::{ Bound, Deref, DerefMut, Index, IndexMut, Range, RangeFrom, RangeFull, RangeInclusive, RangeTo, RangeToInclusive, }, ptr, }; use alloc::{ boxed:...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/entity/index_set.rs
crates/bevy_ecs/src/entity/index_set.rs
//! Contains the [`EntityIndexSet`] type, a [`IndexSet`] pre-configured to use [`EntityHash`] hashing. //! //! This module is a lightweight wrapper around `indexmap`'ss [`IndexSet`] that is more performant for [`Entity`] keys. use core::{ cmp::Ordering, fmt::{self, Debug, Formatter}, hash::BuildHasher, ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/event/trigger.rs
crates/bevy_ecs/src/event/trigger.rs
use crate::event::SetEntityEventTarget; use crate::{ component::ComponentId, entity::Entity, event::{EntityEvent, Event}, observer::{CachedObservers, TriggerContext}, traversal::Traversal, world::DeferredWorld, }; use bevy_ptr::PtrMut; use core::{fmt, marker::PhantomData}; /// [`Trigger`] deter...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/event/mod.rs
crates/bevy_ecs/src/event/mod.rs
//! [`Event`] functionality. mod trigger; pub use bevy_ecs_macros::{EntityEvent, Event}; pub use trigger::*; use crate::{ component::{Component, ComponentId}, entity::Entity, world::World, }; use core::marker::PhantomData; /// An [`Event`] is something that "happens" at a given moment. /// /// To make an...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/message/messages.rs
crates/bevy_ecs/src/message/messages.rs
use crate::{ change_detection::MaybeLocation, message::{Message, MessageCursor, MessageId, MessageInstance}, resource::Resource, }; use alloc::vec::Vec; use core::{ marker::PhantomData, ops::{Deref, DerefMut}, }; #[cfg(feature = "bevy_reflect")] use { crate::reflect::ReflectResource, bevy_re...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/message/mut_iterators.rs
crates/bevy_ecs/src/message/mut_iterators.rs
#[cfg(feature = "multi_threaded")] use crate::batching::BatchingStrategy; use crate::message::{Message, MessageCursor, MessageId, MessageInstance, Messages}; use core::{iter::Chain, slice::IterMut}; /// An iterator that yields any unread messages from an [`MessageMutator`] or [`MessageCursor`]. /// /// [`MessageMutato...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/message/update.rs
crates/bevy_ecs/src/message/update.rs
use crate::{ change_detection::Mut, change_detection::Tick, message::{MessageRegistry, ShouldUpdateMessages}, system::{Local, Res, ResMut}, world::World, }; use bevy_ecs_macros::SystemSet; #[cfg(feature = "bevy_reflect")] use core::hash::Hash; #[doc(hidden)] #[derive(SystemSet, Clone, Debug, Partia...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/message/iterators.rs
crates/bevy_ecs/src/message/iterators.rs
#[cfg(feature = "multi_threaded")] use crate::batching::BatchingStrategy; use crate::message::{Message, MessageCursor, MessageId, MessageInstance, Messages}; use core::{iter::Chain, slice::Iter}; /// An iterator that yields any unread messages from a [`MessageReader`](super::MessageReader) or [`MessageCursor`]. #[deri...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/message/mod.rs
crates/bevy_ecs/src/message/mod.rs
//! [`Message`] functionality. mod iterators; mod message_cursor; mod message_mutator; mod message_reader; mod message_registry; mod message_writer; mod messages; mod mut_iterators; mod update; pub use iterators::*; pub use message_cursor::*; pub use message_mutator::*; pub use message_reader::*; pub use message_regi...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/message/message_mutator.rs
crates/bevy_ecs/src/message/message_mutator.rs
#[cfg(feature = "multi_threaded")] use crate::message::MessageMutParIter; use crate::{ message::{Message, MessageCursor, MessageMutIterator, MessageMutIteratorWithId, Messages}, system::{Local, ResMut, SystemParam}, }; /// Mutably reads messages of type `T` keeping track of which messages have already been rea...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/message/message_cursor.rs
crates/bevy_ecs/src/message/message_cursor.rs
use crate::message::{ Message, MessageIterator, MessageIteratorWithId, MessageMutIterator, MessageMutIteratorWithId, Messages, }; #[cfg(feature = "multi_threaded")] use crate::message::{MessageMutParIter, MessageParIter}; use core::marker::PhantomData; /// Stores the state for a [`MessageReader`] or [`MessageM...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/message/message_registry.rs
crates/bevy_ecs/src/message/message_registry.rs
use crate::{ change_detection::{DetectChangesMut, MutUntyped, Tick}, component::ComponentId, message::{Message, Messages}, resource::Resource, world::World, }; use alloc::vec::Vec; #[doc(hidden)] struct RegisteredMessage { messages_component: ComponentId, // Required to flush the secondary ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/message/message_reader.rs
crates/bevy_ecs/src/message/message_reader.rs
#[cfg(feature = "multi_threaded")] use crate::message::MessageParIter; use crate::{ message::{Message, MessageCursor, MessageIterator, MessageIteratorWithId, Messages}, system::{Local, Res, SystemParam}, }; /// Reads [`Message`]s of type `T` in order and tracks which messages have already been read. /// /// # ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/message/message_writer.rs
crates/bevy_ecs/src/message/message_writer.rs
use crate::{ message::{Message, MessageId, Messages, WriteBatchIds}, system::{ResMut, SystemParam}, }; /// Writes [`Message`]s of type `T`. /// /// # Usage /// /// `MessageWriter`s are usually declared as a [`SystemParam`]. /// ``` /// # use bevy_ecs::prelude::*; /// /// #[derive(Message)] /// pub struct MyMes...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/component/register.rs
crates/bevy_ecs/src/component/register.rs
use alloc::{boxed::Box, vec::Vec}; use bevy_platform::sync::PoisonError; use bevy_utils::TypeIdMap; use core::any::Any; use core::{any::TypeId, fmt::Debug, ops::Deref}; use crate::component::{enforce_no_required_components_recursion, RequiredComponentsRegistrator}; use crate::{ component::{ Component, Comp...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/component/required.rs
crates/bevy_ecs/src/component/required.rs
use alloc::{format, vec::Vec}; use bevy_platform::{hash::FixedHasher, sync::Arc}; use bevy_ptr::OwningPtr; use core::fmt::Debug; use indexmap::{IndexMap, IndexSet}; use thiserror::Error; use crate::{ bundle::BundleInfo, change_detection::{MaybeLocation, Tick}, component::{Component, ComponentId, Components...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/component/info.rs
crates/bevy_ecs/src/component/info.rs
use alloc::{borrow::Cow, vec::Vec}; use bevy_platform::{hash::FixedHasher, sync::PoisonError}; use bevy_ptr::OwningPtr; #[cfg(feature = "bevy_reflect")] use bevy_reflect::Reflect; use bevy_utils::{prelude::DebugName, TypeIdMap}; use core::{ alloc::Layout, any::{Any, TypeId}, fmt::Debug, mem::needs_drop,...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/component/clone.rs
crates/bevy_ecs/src/component/clone.rs
use core::marker::PhantomData; use crate::component::Component; use crate::entity::{ComponentCloneCtx, SourceComponent}; /// Function type that can be used to clone a component of an entity. pub type ComponentCloneFn = fn(&SourceComponent, &mut ComponentCloneCtx); /// The clone behavior to use when cloning or moving...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/src/component/mod.rs
crates/bevy_ecs/src/component/mod.rs
//! Types for declaring and storing [`Component`]s. mod clone; mod info; mod register; mod required; pub use clone::*; pub use info::*; pub use register::*; pub use required::*; use crate::{ entity::EntityMapper, lifecycle::ComponentHook, relationship::ComponentRelationshipAccessor, system::{Local, S...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/examples/change_detection.rs
crates/bevy_ecs/examples/change_detection.rs
//! In this example we will simulate a population of entities. In every tick we will: //! 1. spawn a new entity with a certain possibility //! 2. age all entities //! 3. despawn entities with age > 2 //! //! To demonstrate change detection, there are some console outputs based on changes in //! the `EntityCounter` reso...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_ecs/examples/resources.rs
crates/bevy_ecs/examples/resources.rs
//! In this example we add a counter resource and increase its value in one system, //! while a different system prints the current count to the console. #![expect( clippy::std_instead_of_core, clippy::print_stdout, reason = "Examples should not follow this lint" )] use bevy_ecs::prelude::*; use rand::Rng...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false