diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs index a99e892bf6f4d..d68c64375e2e5 100644 --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -413,6 +413,7 @@ impl WorldQuery for Entity { } /// The [`Fetch`] of [`Entity`]. +#[doc(hidden)] #[derive(Clone)] pub struct EntityFetch { entities: *const Entity, @@ -422,6 +423,7 @@ pub struct EntityFetch { unsafe impl ReadOnlyFetch for EntityFetch {} /// The [`FetchState`] of [`Entity`]. +#[doc(hidden)] pub struct EntityState; // SAFETY: no component or archetype access @@ -500,6 +502,7 @@ impl WorldQuery for &T { } /// The [`FetchState`] of `&T`. +#[doc(hidden)] pub struct ReadState { component_id: ComponentId, marker: PhantomData, @@ -547,6 +550,7 @@ unsafe impl FetchState for ReadState { } /// The [`Fetch`] of `&T`. +#[doc(hidden)] pub struct ReadFetch { table_components: NonNull, entity_table_rows: *const usize, @@ -656,6 +660,7 @@ impl WorldQuery for &mut T { } /// The [`Fetch`] of `&mut T`. +#[doc(hidden)] pub struct WriteFetch { table_components: NonNull, table_ticks: *const UnsafeCell, @@ -681,6 +686,7 @@ impl Clone for WriteFetch { } /// The [`ReadOnlyFetch`] of `&mut T`. +#[doc(hidden)] pub struct ReadOnlyWriteFetch { table_components: NonNull, entities: *const Entity, @@ -703,6 +709,7 @@ impl Clone for ReadOnlyWriteFetch { } /// The [`FetchState`] of `&mut T`. +#[doc(hidden)] pub struct WriteState { component_id: ComponentId, marker: PhantomData, @@ -940,6 +947,7 @@ impl WorldQuery for Option { } /// The [`Fetch`] of `Option`. +#[doc(hidden)] #[derive(Clone)] pub struct OptionFetch { fetch: T, @@ -950,6 +958,7 @@ pub struct OptionFetch { unsafe impl ReadOnlyFetch for OptionFetch {} /// The [`FetchState`] of `Option`. +#[doc(hidden)] pub struct OptionState { state: T, } @@ -1116,6 +1125,7 @@ impl WorldQuery for ChangeTrackers { } /// The [`FetchState`] of [`ChangeTrackers`]. +#[doc(hidden)] pub struct ChangeTrackersState { component_id: ComponentId, marker: PhantomData, @@ -1163,6 +1173,7 @@ unsafe impl FetchState for ChangeTrackersState { } /// The [`Fetch`] of [`ChangeTrackers`]. +#[doc(hidden)] pub struct ChangeTrackersFetch { table_ticks: *const ComponentTicks, entity_table_rows: *const usize, diff --git a/crates/bevy_ecs/src/query/filter.rs b/crates/bevy_ecs/src/query/filter.rs index 6c936f2d0a538..dd12aec8ef842 100644 --- a/crates/bevy_ecs/src/query/filter.rs +++ b/crates/bevy_ecs/src/query/filter.rs @@ -79,11 +79,13 @@ impl WorldQuery for With { } /// The [`Fetch`] of [`With`]. +#[doc(hidden)] pub struct WithFetch { marker: PhantomData, } /// The [`FetchState`] of [`With`]. +#[doc(hidden)] pub struct WithState { component_id: ComponentId, marker: PhantomData, @@ -202,11 +204,13 @@ impl WorldQuery for Without { } /// The [`Fetch`] of [`Without`]. +#[doc(hidden)] pub struct WithoutFetch { marker: PhantomData, } /// The [`FetchState`] of [`Without`]. +#[doc(hidden)] pub struct WithoutState { component_id: ComponentId, marker: PhantomData, @@ -325,6 +329,7 @@ unsafe impl ReadOnlyFetch for WithoutFetch {} pub struct Or(pub T); /// The [`Fetch`] of [`Or`]. +#[doc(hidden)] pub struct OrFetch { fetch: T, matches: bool, @@ -458,6 +463,7 @@ macro_rules! impl_tick_filter { $(#[$meta])* pub struct $name(PhantomData); + #[doc(hidden)] $(#[$fetch_meta])* pub struct $fetch_name { table_ticks: *const UnsafeCell, @@ -469,6 +475,7 @@ macro_rules! impl_tick_filter { change_tick: u32, } + #[doc(hidden)] $(#[$state_meta])* pub struct $state_name { component_id: ComponentId, diff --git a/crates/bevy_ecs/src/system/function_system.rs b/crates/bevy_ecs/src/system/function_system.rs index d66689d956d6b..b43bc5f77bfce 100644 --- a/crates/bevy_ecs/src/system/function_system.rs +++ b/crates/bevy_ecs/src/system/function_system.rs @@ -308,6 +308,7 @@ impl> IntoSystem(pub In); +#[doc(hidden)] pub struct InputMarker; /// The [`System`] counter part of an ordinary function. diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs index 965db7d0994fd..049fee84e0401 100644 --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -181,6 +181,7 @@ pub struct QuerySet<'w, 's, T> { change_tick: u32, } +#[doc(hidden)] pub struct QuerySetState(T); impl_query_set!(); @@ -265,6 +266,7 @@ impl<'w, T: Resource> From> for Res<'w, T> { } /// The [`SystemParamState`] of [`Res`]. +#[doc(hidden)] pub struct ResState { component_id: ComponentId, marker: PhantomData, @@ -332,6 +334,7 @@ impl<'w, 's, T: Resource> SystemParamFetch<'w, 's> for ResState { /// The [`SystemParamState`] of [`Option>`]. /// See: [`Res`] +#[doc(hidden)] pub struct OptionResState(ResState); impl<'a, T: Resource> SystemParam for Option> { @@ -369,6 +372,7 @@ impl<'w, 's, T: Resource> SystemParamFetch<'w, 's> for OptionResState { } /// The [`SystemParamState`] of [`ResMut`]. +#[doc(hidden)] pub struct ResMutState { component_id: ComponentId, marker: PhantomData, @@ -441,6 +445,7 @@ impl<'w, 's, T: Resource> SystemParamFetch<'w, 's> for ResMutState { /// The [`SystemParamState`] of [`Option>`]. /// See: [`ResMut`] +#[doc(hidden)] pub struct OptionResMutState(ResMutState); impl<'a, T: Resource> SystemParam for Option> { @@ -512,6 +517,7 @@ impl<'w, 's> SystemParamFetch<'w, 's> for CommandQueue { unsafe impl ReadOnlySystemParamFetch for WorldState {} /// The [`SystemParamState`] of [`&World`](crate::world::World). +#[doc(hidden)] pub struct WorldState; impl<'w, 's> SystemParam for &'w World { @@ -631,6 +637,7 @@ impl<'a, T: Resource> DerefMut for Local<'a, T> { } /// The [`SystemParamState`] of [`Local`]. +#[doc(hidden)] pub struct LocalState(T); impl<'a, T: Resource + FromWorld> SystemParam for Local<'a, T> { @@ -707,6 +714,7 @@ impl<'a, T: Component> RemovedComponents<'a, T> { unsafe impl ReadOnlySystemParamFetch for RemovedComponentsState {} /// The [`SystemParamState`] of [`RemovedComponents`]. +#[doc(hidden)] pub struct RemovedComponentsState { component_id: ComponentId, marker: PhantomData, @@ -810,6 +818,7 @@ impl<'a, T> From> for NonSend<'a, T> { } /// The [`SystemParamState`] of [`NonSend`]. +#[doc(hidden)] pub struct NonSendState { component_id: ComponentId, marker: PhantomData T>, @@ -881,6 +890,7 @@ impl<'w, 's, T: 'static> SystemParamFetch<'w, 's> for NonSendState { /// The [`SystemParamState`] of [`Option>`]. /// See: [`NonSend`] +#[doc(hidden)] pub struct OptionNonSendState(NonSendState); impl<'w, T: 'static> SystemParam for Option> { @@ -919,6 +929,7 @@ impl<'w, 's, T: 'static> SystemParamFetch<'w, 's> for OptionNonSendState { } /// The [`SystemParamState`] of [`NonSendMut`]. +#[doc(hidden)] pub struct NonSendMutState { component_id: ComponentId, marker: PhantomData T>, @@ -994,6 +1005,7 @@ impl<'w, 's, T: 'static> SystemParamFetch<'w, 's> for NonSendMutState { /// The [`SystemParamState`] of [`Option>`]. /// See: [`NonSendMut`] +#[doc(hidden)] pub struct OptionNonSendMutState(NonSendMutState); impl<'a, T: 'static> SystemParam for Option> { @@ -1038,6 +1050,7 @@ impl<'a> SystemParam for &'a Archetypes { unsafe impl ReadOnlySystemParamFetch for ArchetypesState {} /// The [`SystemParamState`] of [`Archetypes`]. +#[doc(hidden)] pub struct ArchetypesState; // SAFE: no component value access @@ -1069,6 +1082,7 @@ impl<'a> SystemParam for &'a Components { unsafe impl ReadOnlySystemParamFetch for ComponentsState {} /// The [`SystemParamState`] of [`Components`]. +#[doc(hidden)] pub struct ComponentsState; // SAFE: no component value access @@ -1100,6 +1114,7 @@ impl<'a> SystemParam for &'a Entities { unsafe impl ReadOnlySystemParamFetch for EntitiesState {} /// The [`SystemParamState`] of [`Entities`]. +#[doc(hidden)] pub struct EntitiesState; // SAFE: no component value access @@ -1131,6 +1146,7 @@ impl<'a> SystemParam for &'a Bundles { unsafe impl ReadOnlySystemParamFetch for BundlesState {} /// The [`SystemParamState`] of [`Bundles`]. +#[doc(hidden)] pub struct BundlesState; // SAFE: no component value access @@ -1154,6 +1170,7 @@ impl<'w, 's> SystemParamFetch<'w, 's> for BundlesState { } } +/// The [`SystemParamState`] of [`SystemChangeTick`]. #[derive(Debug)] pub struct SystemChangeTick { pub last_change_tick: u32, @@ -1168,6 +1185,7 @@ impl SystemParam for SystemChangeTick { } /// The [`SystemParamState`] of [`SystemChangeTick`]. +#[doc(hidden)] pub struct SystemChangeTickState {} unsafe impl SystemParamState for SystemChangeTickState { @@ -1330,7 +1348,8 @@ impl<'w, 's, P: SystemParam> StaticSystemParam<'w, 's, P> { } } -/// The [`SystemParamState`] of [`SystemChangeTick`]. +/// The [`SystemParamState`] of [`StaticSystemParam`]. +#[doc(hidden)] pub struct StaticSystemParamState(S, PhantomData P>); // Safe: This doesn't add any more reads, and the delegated fetch confirms it