actions

Macro actions 

Source
macro_rules! actions {
    ($namespace:path, [ $( $(#[$attr:meta])* $name:ident),* $(,)? ]) => { ... };
    ([ $( $(#[$attr:meta])* $name:ident),* $(,)? ]) => { ... };
}
Expand description

Defines and registers unit structs that can be used as actions. For more complex data types, derive Action.

For example:

use gpui::actions;
actions!(editor, [MoveUp, MoveDown, MoveLeft, MoveRight, Newline]);

This will create actions with names like editor::MoveUp, editor::MoveDown, etc.

The namespace argument editor can also be omitted, though it is required for Zed actions.