#[derive(AppContext)]
{
// Attributes available to this derive:
#[app]
}
Expand description
#[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.
Failure to add the attribute causes a compile error:
ⓘ
#[derive(AppContext)]
struct MyContext<'a> {
app: &'a mut gpui::App
}