collection!() { /* proc-macro */ }Expand description
Generate an anonymous struct which implements kas::Collection
§Syntax
Collection :
collection![Items?]Items :
(Item,)* Item,?
In this case, Item may be:
- A string literal (interpreted as a label widget), optionally followed by
any of the following method calls:
align,pack,with_stretch,with_margin_style - An expression yielding an object implementing
Widget<Data = _A>
In case all Item instances are a string literal, the data type of the
collection! widget will be (); otherwise the data type of the widget is _A
where _A is a generic type parameter of the widget.
For example usage, see List.