Trait relm4::WidgetTemplate

source ·
pub trait WidgetTemplate: Sized + Debug + AsRef<Self::Root> + Deref<Target = Self::Root> {
    type Root;
    type Init;

    // Required method
    fn init(init: Self::Init) -> Self;
Expand description

A trait that describes a widget template.

Widget templates can be created manually by implementing this trait or by using the widget_template macro.

Required Associated Types§


type Root

The root of the template.


type Init

The parameter used to initialize the template.

Required Methods§


fn init(init: Self::Init) -> Self

Initializes the template.

Object Safety§

This trait is not object safe.