xilem/xilem_core/examples
Philipp Mildenberger 24427bbb44
Use `ViewMarker` trait instead of the generic `Marker` to allow `impl ViewSequence` as return type (#472)
This allows returning `impl ViewSequence` as this was previously not
possibly as the `Marker` generic parameter couldn't be named (easily) in
`ViewSequence<..., Marker>`.

This also provides specialized `ViewSequence`s for xilem
(`WidgetViewSequence` and `FlexSequence`) as well as for xilem_web
(`DomFragment`). Additional doc-tests/documentation and a small example
(in `counter`) for xilem_web is provided as well.

This has the drawback to not being able to reeimplement `ViewSequence`
for types that already implement `View`, which was previously possible
(as seen by the now removed `NoElementView` `ViewSequence`
implementation).
And additionally by introducing more boilerplate by having to implement
`ViewMarker` for every type that implements `View`.

---------

Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
2024-08-05 10:53:19 +00:00
..
filesystem.rs Use `ViewMarker` trait instead of the generic `Marker` to allow `impl ViewSequence` as return type (#472) 2024-08-05 10:53:19 +00:00
user_interface.rs Use `ViewMarker` trait instead of the generic `Marker` to allow `impl ViewSequence` as return type (#472) 2024-08-05 10:53:19 +00:00