kas-gui / kas

Another GUI toolkit
Apache License 2.0
893 stars 27 forks source link

impl_singleton: support _ and impl Trait in field types #359

Closed dhardy closed 1 year ago

dhardy commented 1 year ago

This replaces the prior for<X> Foo<X> style of inline generics.

This macro is almost independent of KAS/widget-specifics now; the only exception is that a field with type _ (or omitted type) and attribute #[widget] has bound ::kas::Widget assumed. This is quite important to examples. Still, it should be possible to publish a variant without this feature to impl-tools.