1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
use commandify;
use TokenStream as ProcTokenStream;
use Punctuated;
use ;
/// Promotes a function to a `Command` struct, and creates an equivalent `Commands` and `World` method via trait extensions
///
/// - `#[command(no_trait)]` prevents generating a trait method for `Commands`
/// - `#[command(no_world)]` prevents generating a trait impl for `World`
/// - `#[command(name = T)]` will use this name for the method and related struct/trait names
/// - `#[command(struct_name = T)]` will use this name for the generated struct, defaults to `<Foo>Command`
/// - `#[command(trait_name = T)]` will use this name for the generated trait, defaults to `Commands<Foo>Ext`
/// - `#[command(ecs = T)]` to change the crate root to T, defaults to `bevy::ecs`
/// - `#[command(bevy_ecs)]` to change the crate root to `bevy_ecs`
///
/// Note: `T`s may be optionally quoted
///
/// Commands may optionally return `&mut Self` to allow chaining their calls
/// Promotes a function to an EntityCommand struct, and creates an equivalent EntityCommands method via trait extensions
///
/// - `#[entity_command(no_trait)]` prevents generating a trait method for EntityCommands
/// - `#[entity_command(name = T)]` will use this name for the method and related struct/trait names
/// - `#[entity_command(struct_name = T)]` will use this name for the generated struct, defaults to `<Foo>EntityCommand`
/// - `#[entity_command(trait_name = T)]` will use this name for the generated trait, defaults to `EntityCommands<Foo>Ext`
/// - `#[entity_command(ecs = T)]` to change the crate root to T, defaults to `bevy::ecs`
/// - `#[entity_command(bevy_ecs)]` to change the crate root to `bevy_ecs`
///
/// Note: `T`s may be optionally quoted
///
/// Commands may optionally return `&mut Self` to allow chaining their calls