panoramix 0.0.3

A prototype implementation of reactive UI in rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::widget_sequence::FlexWidget;
use crate::widget_sequence::WidgetSequence;

pub struct WidgetList<Child: WidgetSequence> {
    pub children: Vec<Child>,
}

impl<Child: WidgetSequence> WidgetSequence for WidgetList<Child> {
    fn widgets(&mut self) -> Vec<&mut dyn FlexWidget> {
        self.children
            .iter_mut()
            .flat_map(|child| child.widgets())
            .collect()
    }
}