Skip to main content

Component

Trait Component 

Source
pub trait Component {
    const NAME: &'static str;
    const DOC: &'static str = "";
    const PROPS: &'static [Prop] = _;

    // Required method
    fn build(props: &Props) -> Widget;
}
Expand description

A custom component: see the module docs.

Required Associated Constants§

Source

const NAME: &'static str

The .yui element name (<StatBar …/>), PascalCase.

Provided Associated Constants§

Source

const DOC: &'static str = ""

One line for the designer’s toolbox tooltip.

Source

const PROPS: &'static [Prop] = _

Required Methods§

Source

fn build(props: &Props) -> Widget

The widget tree for these properties. Common attributes (position, size, bg, on_click, …) are applied to the result by the caller.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§