Skip to main content

UiDocumentExt

Trait UiDocumentExt 

pub trait UiDocumentExt {
    // Required methods
    fn build(&self, theme: &Theme) -> Result<Box<dyn Widget>, UiGraphError>;
    fn build_with(
        &self,
        theme: &Theme,
        context: &UiBuildContext,
    ) -> Result<Box<dyn Widget>, UiGraphError>;
}
Expand description

Compile a validated serialized graph into ordinary Tilo widgets.

Required Methods§

fn build(&self, theme: &Theme) -> Result<Box<dyn Widget>, UiGraphError>

Build the retained widget subtree represented by this graph.

§Errors

Returns a schema validation error before any widget is constructed.

fn build_with( &self, theme: &Theme, context: &UiBuildContext, ) -> Result<Box<dyn Widget>, UiGraphError>

Build with process-local services such as screen navigation.

§Errors

Returns a schema validation error before any widget is constructed.

Implementors§