stack of heterogenous views #613
Answered
by
dzhou121
JimitSoni18
asked this question in
Q&A
-
how do I render an arbitrary number of items on a horizontal stack/row, where all elements are not necessarily the same type. For example, I want to make a file explorer breadcrumb where buttons and text "/" are interleaved, where buttons have directory names and clicking them takes you to that directory |
Beta Was this translation helpful? Give feedback.
Answered by
dzhou121
Oct 9, 2024
Replies: 1 comment 1 reply
-
I found that View is implemented for Box, but is there a different / better approach? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Box is the way. A built in trait
into_any
is just for this purpose.floem/src/view.rs
Line 107 in 4dbecc8