macro_rules! ui_vec {
() => { ... };
($node:expr; $n:expr) => { ... };
($($nodes:tt)+) => { ... };
}Expand description
Creates an UiVec containing the arguments.
Note that the items can be any type that converts to nodes, ui_vec! automatically calls IntoUiNode::into_node for each item.
ยงExamples
Create a vec containing a list of nodes/widgets:
let widgets = ui_vec![Text!("Hello"), Text!("World!")];Create a vec containing the node repeated n times:
let widgets = ui_vec![Text!(" . "); 10];Note that this is different from vec![item; n], the node is not cloned, the expression is called n times to
generate the nodes.