Skip to main content

WidgetPayload

Trait WidgetPayload 

Source
pub trait WidgetPayload:
    Send
    + Sync
    + 'static {
    // Required method
    fn as_any(&self) -> &dyn Any;
}
Expand description

Type-erased bridge between the element tree and the render layer.

Implemented by WidgetBox in rosace-widgets. Defined here in rosace-core so NativeElement can hold it without a circular dep.

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Returns self as &dyn Any so the render walker can downcast.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§