Skip to main content

Crate fc_gpui_macros

Crate fc_gpui_macros 

Source

Macros§

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.

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.