Crate gpui_macros

Crate gpui_macros 

Source

Macros§

border_style_methods
Generates methods for border styles.
box_shadow_style_methods
Generates methods for box shadow styles.
cursor_style_methods
Generates methods for cursor styles.
margin_style_methods
Generates methods for margin styles.
overflow_style_methods
Generates methods for overflow styles.
padding_style_methods
Generates methods for padding styles.
position_style_methods
Generates methods for position styles.
register_action
This can be used to register an action with the GPUI runtime when you want to manually implement the Action trait. Typically you should use the Action derive macro or actions! macro instead.
visibility_style_methods
Generates methods for visibility styles.

Attribute Macros§

derive_inspector_reflection
When added to a trait, #[derive_inspector_reflection] generates a module which provides enumeration and lookup by name of all methods that have the shape fn method(self) -> Self. This is used by the inspector so that it can use the builder methods in Styled and StyledExt.
test
#[gpui::test] can be used to annotate test functions that run with GPUI support.

Derive Macros§

Action
Action derive macro - see the trait documentation for details.
AppContext
#[derive(AppContext)] is used to create a context out of anything that holds a &mut App Note that a #[app] attribute is required to identify the variable holding the &mut App.
IntoElement
#[derive(IntoElement)] is used to create a Component out of anything that implements the RenderOnce trait.
VisualContext
#[derive(VisualContext)] is used to create a visual context out of anything that holds a &mut Window and implements AppContext Note that a #[app] and a #[window] attribute are required to identify the variables holding the &mut App, and &mut Window respectively.