comet/core/
app.rs

1use crate::prelude::*;
2
3pub struct App<Comp, Msg>
4where
5    Comp: Component<Msg>,
6    Msg: Clone + 'static,
7{
8    pub root: Shared<Comp>,
9    phantom: std::marker::PhantomData<Msg>,
10}
11
12impl<Comp, Msg> App<Comp, Msg>
13where
14    Comp: Component<Msg>,
15    Msg: Clone,
16{
17    pub fn new(root: Shared<Comp>) -> Self {
18        Self {
19            root,
20            phantom: std::marker::PhantomData,
21        }
22    }
23}