Skip to main content

impl_view_meta

Macro impl_view_meta 

Source
macro_rules! impl_view_meta {
    ($name:expr) => { ... };
}
Expand description

Generate View trait id(), classes(), and meta() methods for widgets with props.

This macro generates the id(), classes(), and meta() methods for the View trait that delegate to WidgetProps.

§Example

impl View for MyWidget {
    fn render(&self, ctx: &mut RenderContext) {
        // ... rendering logic
    }

    crate::impl_view_meta!("MyWidget");
}