Skip to main content

BuildableWidget

Trait BuildableWidget 

Source
pub trait BuildableWidget: Widget {
    // Required method
    fn build(&self, context: &BuildContext) -> Rc<dyn Widget>;
}
Expand description

Optional build contract for widget crates that want to construct a child description from a context. It is separate from Widget so core does not force every renderer-specific widget to choose a child representation.

Required Methods§

Source

fn build(&self, context: &BuildContext) -> Rc<dyn Widget>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§