Skip to main content

ParentElement

Derive Macro ParentElement 

Source
#[derive(ParentElement)]
{
    // Attributes available to this derive:
    #[children]
}
Expand description

Derives gpui::ParentElement for a struct with a #[children] field.

The field must be a collection that has an extend method that accepts gpui::AnyElement values, typically a Vec<AnyElement>. Its child and children methods add to it. Mark at most one field.