WidgetTemplate

Trait 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§

Source

type Root

The root of the template.

Source

type Init

The parameter used to initialize the template.

Required Methods§

Source

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

Initializes the template.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§