mirror of
https://github.com/bevyengine/bevy
synced 2025-01-24 10:55:11 +00:00
d79888bdae
# Objective Document `bevy_ecs::archetype` and and declutter the public documentation for the module by making types non-`pub`. Addresses #3362 for `bevy_ecs::archetype`. ## Solution - Add module level documentation. - Add type and API level documentation for all public facing types. - Make `ArchetypeId`, `ArchetypeGeneration`, and `ArchetypeComponentId` truly opaque IDs that are not publicly constructable. - Make `AddBundle` non-pub, make `Edges::get_add_bundle` return a `Option<ArchetypeId>` and fork the existing function into `Edges::get_add_bundle_internal`. - Remove `pub(crate)` on fields that have a corresponding pub accessor function. - Removed the `Archetypes: Default` impl, opting for a `pub(crate) fn new` alternative instead. --- ## Changelog Added: `ArchetypeGeneration` now implements `Ord` and `PartialOrd`. Removed: `Archetypes`'s `Default` implementation. Removed: `Archetype::new` and `Archetype::is_empty`. Removed: `ArchetypeId::new` and `ArchetypeId::value`. Removed: `ArchetypeGeneration::value` Removed: `ArchetypeIdentity`. Removed: `ArchetypeComponentId::new` and `ArchetypeComponentId::value`. Removed: `AddBundle`. `Edges::get_add_bundle` now returns `Option<ArchetypeId>` |
||
---|---|---|
.. | ||
entity | ||
query | ||
schedule | ||
storage | ||
system | ||
world | ||
archetype.rs | ||
bundle.rs | ||
change_detection.rs | ||
component.rs | ||
event.rs | ||
lib.rs | ||
reflect.rs |