Hide docs for concrete impls of Fetch, FetchState, and SystemParamState (#4250)
# Objective The following pages in the docs are rather noisy, and the types they point to are not particularly useful by themselves: - http://dev-docs.bevyengine.org/bevy/ecs/query/index.html - http://dev-docs.bevyengine.org/bevy/ecs/system/index.html ## Solution - Replace docs on these types with `#[doc(hidden)]`. - Hide `InputMarker` too.
This commit is contained in:
parent
31636a3504
commit
4c1678c78d
@ -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<T: Component> WorldQuery for &T {
|
||||
}
|
||||
|
||||
/// The [`FetchState`] of `&T`.
|
||||
#[doc(hidden)]
|
||||
pub struct ReadState<T> {
|
||||
component_id: ComponentId,
|
||||
marker: PhantomData<T>,
|
||||
@ -547,6 +550,7 @@ unsafe impl<T: Component> FetchState for ReadState<T> {
|
||||
}
|
||||
|
||||
/// The [`Fetch`] of `&T`.
|
||||
#[doc(hidden)]
|
||||
pub struct ReadFetch<T> {
|
||||
table_components: NonNull<T>,
|
||||
entity_table_rows: *const usize,
|
||||
@ -656,6 +660,7 @@ impl<T: Component> WorldQuery for &mut T {
|
||||
}
|
||||
|
||||
/// The [`Fetch`] of `&mut T`.
|
||||
#[doc(hidden)]
|
||||
pub struct WriteFetch<T> {
|
||||
table_components: NonNull<T>,
|
||||
table_ticks: *const UnsafeCell<ComponentTicks>,
|
||||
@ -681,6 +686,7 @@ impl<T> Clone for WriteFetch<T> {
|
||||
}
|
||||
|
||||
/// The [`ReadOnlyFetch`] of `&mut T`.
|
||||
#[doc(hidden)]
|
||||
pub struct ReadOnlyWriteFetch<T> {
|
||||
table_components: NonNull<T>,
|
||||
entities: *const Entity,
|
||||
@ -703,6 +709,7 @@ impl<T> Clone for ReadOnlyWriteFetch<T> {
|
||||
}
|
||||
|
||||
/// The [`FetchState`] of `&mut T`.
|
||||
#[doc(hidden)]
|
||||
pub struct WriteState<T> {
|
||||
component_id: ComponentId,
|
||||
marker: PhantomData<T>,
|
||||
@ -940,6 +947,7 @@ impl<T: WorldQuery> WorldQuery for Option<T> {
|
||||
}
|
||||
|
||||
/// The [`Fetch`] of `Option<T>`.
|
||||
#[doc(hidden)]
|
||||
#[derive(Clone)]
|
||||
pub struct OptionFetch<T> {
|
||||
fetch: T,
|
||||
@ -950,6 +958,7 @@ pub struct OptionFetch<T> {
|
||||
unsafe impl<T: ReadOnlyFetch> ReadOnlyFetch for OptionFetch<T> {}
|
||||
|
||||
/// The [`FetchState`] of `Option<T>`.
|
||||
#[doc(hidden)]
|
||||
pub struct OptionState<T: FetchState> {
|
||||
state: T,
|
||||
}
|
||||
@ -1116,6 +1125,7 @@ impl<T: Component> WorldQuery for ChangeTrackers<T> {
|
||||
}
|
||||
|
||||
/// The [`FetchState`] of [`ChangeTrackers`].
|
||||
#[doc(hidden)]
|
||||
pub struct ChangeTrackersState<T> {
|
||||
component_id: ComponentId,
|
||||
marker: PhantomData<T>,
|
||||
@ -1163,6 +1173,7 @@ unsafe impl<T: Component> FetchState for ChangeTrackersState<T> {
|
||||
}
|
||||
|
||||
/// The [`Fetch`] of [`ChangeTrackers`].
|
||||
#[doc(hidden)]
|
||||
pub struct ChangeTrackersFetch<T> {
|
||||
table_ticks: *const ComponentTicks,
|
||||
entity_table_rows: *const usize,
|
||||
|
@ -79,11 +79,13 @@ impl<T: Component> WorldQuery for With<T> {
|
||||
}
|
||||
|
||||
/// The [`Fetch`] of [`With`].
|
||||
#[doc(hidden)]
|
||||
pub struct WithFetch<T> {
|
||||
marker: PhantomData<T>,
|
||||
}
|
||||
|
||||
/// The [`FetchState`] of [`With`].
|
||||
#[doc(hidden)]
|
||||
pub struct WithState<T> {
|
||||
component_id: ComponentId,
|
||||
marker: PhantomData<T>,
|
||||
@ -202,11 +204,13 @@ impl<T: Component> WorldQuery for Without<T> {
|
||||
}
|
||||
|
||||
/// The [`Fetch`] of [`Without`].
|
||||
#[doc(hidden)]
|
||||
pub struct WithoutFetch<T> {
|
||||
marker: PhantomData<T>,
|
||||
}
|
||||
|
||||
/// The [`FetchState`] of [`Without`].
|
||||
#[doc(hidden)]
|
||||
pub struct WithoutState<T> {
|
||||
component_id: ComponentId,
|
||||
marker: PhantomData<T>,
|
||||
@ -325,6 +329,7 @@ unsafe impl<T> ReadOnlyFetch for WithoutFetch<T> {}
|
||||
pub struct Or<T>(pub T);
|
||||
|
||||
/// The [`Fetch`] of [`Or`].
|
||||
#[doc(hidden)]
|
||||
pub struct OrFetch<T: FilterFetch> {
|
||||
fetch: T,
|
||||
matches: bool,
|
||||
@ -458,6 +463,7 @@ macro_rules! impl_tick_filter {
|
||||
$(#[$meta])*
|
||||
pub struct $name<T>(PhantomData<T>);
|
||||
|
||||
#[doc(hidden)]
|
||||
$(#[$fetch_meta])*
|
||||
pub struct $fetch_name<T> {
|
||||
table_ticks: *const UnsafeCell<ComponentTicks>,
|
||||
@ -469,6 +475,7 @@ macro_rules! impl_tick_filter {
|
||||
change_tick: u32,
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
$(#[$state_meta])*
|
||||
pub struct $state_name<T> {
|
||||
component_id: ComponentId,
|
||||
|
@ -308,6 +308,7 @@ impl<In, Out, Sys: System<In = In, Out = Out>> IntoSystem<In, Out, AlreadyWasSys
|
||||
/// }
|
||||
/// ```
|
||||
pub struct In<In>(pub In);
|
||||
#[doc(hidden)]
|
||||
pub struct InputMarker;
|
||||
|
||||
/// The [`System`] counter part of an ordinary function.
|
||||
|
@ -181,6 +181,7 @@ pub struct QuerySet<'w, 's, T> {
|
||||
change_tick: u32,
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub struct QuerySetState<T>(T);
|
||||
|
||||
impl_query_set!();
|
||||
@ -265,6 +266,7 @@ impl<'w, T: Resource> From<ResMut<'w, T>> for Res<'w, T> {
|
||||
}
|
||||
|
||||
/// The [`SystemParamState`] of [`Res<T>`].
|
||||
#[doc(hidden)]
|
||||
pub struct ResState<T> {
|
||||
component_id: ComponentId,
|
||||
marker: PhantomData<T>,
|
||||
@ -332,6 +334,7 @@ impl<'w, 's, T: Resource> SystemParamFetch<'w, 's> for ResState<T> {
|
||||
|
||||
/// The [`SystemParamState`] of [`Option<Res<T>>`].
|
||||
/// See: [`Res<T>`]
|
||||
#[doc(hidden)]
|
||||
pub struct OptionResState<T>(ResState<T>);
|
||||
|
||||
impl<'a, T: Resource> SystemParam for Option<Res<'a, T>> {
|
||||
@ -369,6 +372,7 @@ impl<'w, 's, T: Resource> SystemParamFetch<'w, 's> for OptionResState<T> {
|
||||
}
|
||||
|
||||
/// The [`SystemParamState`] of [`ResMut<T>`].
|
||||
#[doc(hidden)]
|
||||
pub struct ResMutState<T> {
|
||||
component_id: ComponentId,
|
||||
marker: PhantomData<T>,
|
||||
@ -441,6 +445,7 @@ impl<'w, 's, T: Resource> SystemParamFetch<'w, 's> for ResMutState<T> {
|
||||
|
||||
/// The [`SystemParamState`] of [`Option<ResMut<T>>`].
|
||||
/// See: [`ResMut<T>`]
|
||||
#[doc(hidden)]
|
||||
pub struct OptionResMutState<T>(ResMutState<T>);
|
||||
|
||||
impl<'a, T: Resource> SystemParam for Option<ResMut<'a, T>> {
|
||||
@ -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<T>`].
|
||||
#[doc(hidden)]
|
||||
pub struct LocalState<T: Resource>(T);
|
||||
|
||||
impl<'a, T: Resource + FromWorld> SystemParam for Local<'a, T> {
|
||||
@ -707,6 +714,7 @@ impl<'a, T: Component> RemovedComponents<'a, T> {
|
||||
unsafe impl<T: Component> ReadOnlySystemParamFetch for RemovedComponentsState<T> {}
|
||||
|
||||
/// The [`SystemParamState`] of [`RemovedComponents<T>`].
|
||||
#[doc(hidden)]
|
||||
pub struct RemovedComponentsState<T> {
|
||||
component_id: ComponentId,
|
||||
marker: PhantomData<T>,
|
||||
@ -810,6 +818,7 @@ impl<'a, T> From<NonSendMut<'a, T>> for NonSend<'a, T> {
|
||||
}
|
||||
|
||||
/// The [`SystemParamState`] of [`NonSend<T>`].
|
||||
#[doc(hidden)]
|
||||
pub struct NonSendState<T> {
|
||||
component_id: ComponentId,
|
||||
marker: PhantomData<fn() -> T>,
|
||||
@ -881,6 +890,7 @@ impl<'w, 's, T: 'static> SystemParamFetch<'w, 's> for NonSendState<T> {
|
||||
|
||||
/// The [`SystemParamState`] of [`Option<NonSend<T>>`].
|
||||
/// See: [`NonSend<T>`]
|
||||
#[doc(hidden)]
|
||||
pub struct OptionNonSendState<T>(NonSendState<T>);
|
||||
|
||||
impl<'w, T: 'static> SystemParam for Option<NonSend<'w, T>> {
|
||||
@ -919,6 +929,7 @@ impl<'w, 's, T: 'static> SystemParamFetch<'w, 's> for OptionNonSendState<T> {
|
||||
}
|
||||
|
||||
/// The [`SystemParamState`] of [`NonSendMut<T>`].
|
||||
#[doc(hidden)]
|
||||
pub struct NonSendMutState<T> {
|
||||
component_id: ComponentId,
|
||||
marker: PhantomData<fn() -> T>,
|
||||
@ -994,6 +1005,7 @@ impl<'w, 's, T: 'static> SystemParamFetch<'w, 's> for NonSendMutState<T> {
|
||||
|
||||
/// The [`SystemParamState`] of [`Option<NonSendMut<T>>`].
|
||||
/// See: [`NonSendMut<T>`]
|
||||
#[doc(hidden)]
|
||||
pub struct OptionNonSendMutState<T>(NonSendMutState<T>);
|
||||
|
||||
impl<'a, T: 'static> SystemParam for Option<NonSendMut<'a, T>> {
|
||||
@ -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, P>(S, PhantomData<fn() -> P>);
|
||||
|
||||
// Safe: This doesn't add any more reads, and the delegated fetch confirms it
|
||||
|
Loading…
Reference in New Issue
Block a user