switch away from handles to refs that must be upgraded once

This commit is contained in:
2025-12-20 01:36:07 -05:00
parent 32ca4ec5a6
commit c00ded78c0
11 changed files with 157 additions and 85 deletions

View File

@@ -151,14 +151,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> FnOnce<(&mut State,)>
for SpanBuilder<State, LEN, Wa, Tag>
impl<State: StateLike<State>, const LEN: usize, Wa: WidgetArrLike<State, LEN, Tag>, Tag>
WidgetFnTrait<State> for SpanBuilder<State, LEN, Wa, Tag>
{
type Output = Span;
type Widget = Span;
extern "rust-call" fn call_once(self, args: (&mut State,)) -> Self::Output {
#[track_caller]
fn run(self, state: &mut State) -> Self::Widget {
Span {
children: self.children.add(args.0).arr.into_iter().collect(),
children: self.children.add(state).arr.into_iter().collect(),
dir: self.dir,
gap: self.gap,
}