zng_app::widget::base

Trait WidgetImpl

Source
pub trait WidgetImpl {
    // Required methods
    fn inherit(widget: WidgetType) -> Self;
    fn base(&mut self) -> &mut WidgetBase;
}
Expand description

Trait implemented by all #[widget].

This trait is used in widget mix-in implementations to constraint P, it is also used by the the generated widget code. You do not need to implement it directly.

Required Methods§

Source

fn inherit(widget: WidgetType) -> Self

The inherit function.

Source

fn base(&mut self) -> &mut WidgetBase

Reference the parent WidgetBase.

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§