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
an
align
orpack
method call - 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
.