[yew-devel] [RFC yew-comp/yew-widget-toolkit 0/4] make RenderFn's return type generic

Dominik Csapak d.csapak at proxmox.com
Wed Dec 10 11:48:47 CET 2025


This series changes the RenderFn type to have a generic return type, which can replace our TextRenderFn
and allows us to do more things with it.

I send this as a preparation for some cleanups I want to do, but for those
to work better, we need this way of defining RenderFn.

Sending as RFC, since I'm not fully convinced this is a good idea,
especially extending the builder_cb macro this way, but I could not come
up with something better.

The first patch in pwt is just updating the tests to new rustc output,
can be applied independently, but is necessary to let the tests
run currently.

proxmox-yew-widget-toolkit:

Dominik Csapak (3):
  pwt-macros: update tests to work for newer rustc
  pwt-macros: builder: allow multiple generic types in callback variant
  props: make RenderFn's return type generic

 pwt-macros/src/builder.rs                    | 19 ++++-
 pwt-macros/tests/builder/invalid_type.stderr |  2 +-
 pwt-macros/tests/widget/wrong_crate.stderr   |  6 +-
 src/props/mod.rs                             |  5 +-
 src/props/render_function.rs                 | 81 +++-----------------
 src/touch/material_app.rs                    | 10 +--
 src/widget/catalog_loader.rs                 |  6 +-
 src/widget/desktop_app.rs                    |  6 +-
 src/widget/meter.rs                          |  6 +-
 src/widget/theme_loader.rs                   |  6 +-
 10 files changed, 50 insertions(+), 97 deletions(-)


proxmox-yew-comp:

Dominik Csapak (1):
  rrd: replace TextRenderFn with new generic RenderFn

 src/rrd/graph.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


Summary over all repositories:
  11 files changed, 54 insertions(+), 101 deletions(-)

-- 
Generated by git-murpp 0.8.1




More information about the yew-devel mailing list