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§
Sourcefn inherit(widget: WidgetType) -> Self
fn inherit(widget: WidgetType) -> Self
The inherit function.
Sourcefn base(&mut self) -> &mut WidgetBase
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.