@@ -213,7 +213,7 @@ impl Struct {
213
213
214
214
let struct_ref_doc = format ! (
215
215
r#"Generated by `#[derive(SplitFields)]`.
216
- This struct is a version of `{struct_name}` that holds references to its fields."#
216
+ This struct is a version of [ `{struct_name}`] that holds references to its fields."#
217
217
) ;
218
218
219
219
let struct_ref = quote ! {
@@ -267,7 +267,7 @@ This struct is a version of `{struct_name}` that holds references to its fields.
267
267
268
268
let struct_ref_mut_doc = format ! (
269
269
r#"Generated by `#[derive(SplitFields)]`.
270
- This struct is a version of `{struct_name}` that holds mutable references to its fields."#
270
+ This struct is a version of [ `{struct_name}`] that holds mutable references to its fields."#
271
271
) ;
272
272
273
273
let struct_ref = quote ! {
@@ -349,9 +349,9 @@ This struct is a version of `{struct_name}` that holds mutable references to its
349
349
350
350
let struct_of_doc = format ! (
351
351
r#"Generated by `#[derive(SplitFields)]`.
352
- This struct is a version of `{struct_name}` that holds each field in its own [Storage](::stecs::storage::Storage).
352
+ This struct is a version of [ `{struct_name}`] that holds each field in its own [Storage](::stecs::storage::Storage).
353
353
354
- **Note**: It is used by other generated structures and does not need to be used by user code ."#
354
+ **Note**: It is not intended to be used directly, as it is used by other generated structures ."#
355
355
) ;
356
356
357
357
quote ! {
@@ -367,20 +367,36 @@ This struct is a version of `{struct_name}` that holds each field in its own [St
367
367
#[ cfg( not( feature = "dynamic" ) ) ]
368
368
let dynamic = quote ! { } ;
369
369
#[ cfg( feature = "dynamic" ) ]
370
- let dynamic =
371
- quote ! { pub r#dyn: :: stecs:: dynamic:: DynamicStorage <#generic_family_name>, } ;
370
+ let dynamic = quote ! {
371
+ /// Dynamic components attached to the archetype.
372
+ ///
373
+ /// **Note**: not intended to be used directly,
374
+ /// but rather via methods and querying macros.
375
+ /// *It is only exposed to be accessible in queries*.
376
+ pub r#dyn: :: stecs:: dynamic:: DynamicStorage <#generic_family_name>,
377
+ } ;
372
378
373
379
let struct_of_doc = format ! (
374
380
r#"Generated by `#[derive(SplitFields)]`.
375
- This struct is a version of `{struct_name}` that holds each field in its own [Storage](::stecs::storage::Storage).
381
+ This struct is a version of [ `{struct_name}`] that holds each field in its own [Storage](::stecs::storage::Storage).
376
382
377
- **Note**: It is not intended to be used directly, but rather as, for example, `StructOf<Vec <{struct_name}>>`."#
383
+ **Note**: It is not intended to be used directly, but rather as, for example, `StructOf<Dense <{struct_name}>>`."#
378
384
) ;
379
385
380
386
quote ! {
381
387
#[ doc = #struct_of_doc]
382
388
#vis struct #struct_of_name<#generics_family> {
389
+ /// The id's of all existing entities belonging to this archetype.
390
+ ///
391
+ /// **Note**: not intended to be used directly,
392
+ /// but rather via methods and querying macros.
393
+ /// *It is only exposed to be accessible in queries*.
383
394
pub ids: #generic_family_name:: Generator ,
395
+ /// The inner fields of the archetype.
396
+ ///
397
+ /// **Note**: not intended to be used directly,
398
+ /// but rather via methods and querying macros.
399
+ /// *It is only exposed to be accessible in queries*.
384
400
pub inner: #struct_split_name<#generics_family_use>,
385
401
#dynamic
386
402
}
0 commit comments