Skip to content

Commit d7a27cc

Browse files
committed
more docs
1 parent bbb4e5d commit d7a27cc

File tree

1 file changed

+9
-1
lines changed
  • crates/bevy_ecs/src/system/commands

1 file changed

+9
-1
lines changed

crates/bevy_ecs/src/system/commands/mod.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ pub struct Despawn {
369369
pub entity: Entity,
370370
}
371371

372+
/// The error resulting from [`EntityCommands::despawn`]
372373
#[derive(Debug)]
373374
pub struct DespawnError {
374375
pub entity: Entity,
@@ -393,6 +394,8 @@ pub struct InsertBundle<T> {
393394
pub bundle: T,
394395
}
395396

397+
/// The error resulting from [`EntityCommands::insert_bundle`]
398+
/// Contains both the failed to insert bundle and the relative entity.
396399
pub struct InsertBundleError<T> {
397400
pub entity: Entity,
398401
pub bundle: T,
@@ -432,6 +435,8 @@ pub struct Insert<T> {
432435
pub component: T,
433436
}
434437

438+
/// The error resulting from [`EntityCommands::insert`]
439+
/// Contains both the failed to insert component and the relative entity.
435440
pub struct InsertError<T> {
436441
pub entity: Entity,
437442
pub component: T,
@@ -472,6 +477,7 @@ pub struct Remove<T> {
472477
phantom: PhantomData<T>,
473478
}
474479

480+
/// The error resulting from [`EntityCommands::remove`]
475481
pub struct RemoveError<T> {
476482
pub entity: Entity,
477483
phantom: PhantomData<T>,
@@ -511,6 +517,7 @@ pub struct RemoveBundle<T> {
511517
pub phantom: PhantomData<T>,
512518
}
513519

520+
/// The error resulting from [`EntityCommands::remove_bundle`]
514521
pub struct RemoveBundleError<T> {
515522
pub entity: Entity,
516523
phantom: PhantomData<T>,
@@ -560,8 +567,9 @@ pub struct RemoveResource<T: Component> {
560567
pub phantom: PhantomData<T>,
561568
}
562569

570+
/// The error resulting from [`Commands::remove_resource`]
563571
pub struct RemoveResourceError<T> {
564-
pub phantom: PhantomData<T>,
572+
phantom: PhantomData<T>,
565573
}
566574

567575
impl<T> Debug for RemoveResourceError<T> {

0 commit comments

Comments
 (0)