separate state from rsc

This commit is contained in:
2026-01-01 22:18:08 -05:00
parent 462c0e6416
commit 5da1e9e767
22 changed files with 373 additions and 492 deletions

View File

@@ -159,15 +159,15 @@ pub struct SpanBuilder<State, const LEN: usize, Wa: WidgetArrLike<State, LEN, Ta
_pd: PhantomData<(State, Tag)>,
}
impl<State: StateLike<State>, const LEN: usize, Wa: WidgetArrLike<State, LEN, Tag>, Tag>
WidgetFnTrait<State> for SpanBuilder<State, LEN, Wa, Tag>
impl<Rsc, const LEN: usize, Wa: WidgetArrLike<Rsc, LEN, Tag>, Tag> WidgetFnTrait<Rsc>
for SpanBuilder<Rsc, LEN, Wa, Tag>
{
type Widget = Span;
#[track_caller]
fn run(self, state: &mut State) -> Self::Widget {
fn run(self, rsc: &mut Rsc) -> Self::Widget {
Span {
children: self.children.add(state).arr.into_iter().collect(),
children: self.children.add(rsc).arr.into_iter().collect(),
dir: self.dir,
gap: self.gap,
}