init

Macro init 

Source
macro_rules! init {
    () => { ... };
    ($($name:ident : $t:ty = ($init:expr) $(=> { $($a:tt)* } )?),+$(,)?) => { ... };
}
Available on crate feature winio only.
Expand description

Helper macro for Component::init.

init! {
    window: Window = (()) => {
        text: "Basic example",
        size: Size::new(800.0, 600.0),
    },
    canvas: Canvas = (&window),
}
window.show();