Skip to main content

ComponentDef

Trait ComponentDef 

Source
pub trait ComponentDef {
    // Required methods
    fn name(&self) -> &'static str;
    fn accepts_children(&self) -> bool;
    fn props(&self) -> &[PropDef];
}
Expand description

Definition of a PEPL UI component.

Each of the 10 Phase 0 components has a static definition specifying its name, props, and whether it accepts children.

Required Methods§

Source

fn name(&self) -> &'static str

Component type name (e.g., “Column”, “Text”, “Button”).

Source

fn accepts_children(&self) -> bool

Whether this component accepts children.

Source

fn props(&self) -> &[PropDef]

Prop definitions (required and optional).

Implementors§