1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use super::{builder::IntoAfterMount, types::*, MountType};
use crate::virtual_dom::View;
use std::marker::PhantomData;

#[allow(clippy::module_name_repetitions)]
pub struct AppInitCfg<Ms, Mdl, ElC, GMs, IAM: ?Sized>
where
    Ms: 'static,
    Mdl: 'static,
    ElC: View<Ms>,
    IAM: IntoAfterMount<Ms, Mdl, ElC, GMs>,
{
    pub mount_type: MountType,
    pub into_after_mount: Box<IAM>,
    pub phantom: PhantomData<(Ms, Mdl, ElC, GMs)>,
}

#[allow(clippy::module_name_repetitions)]
pub struct AppCfg<Ms, Mdl, ElC, GMs>
where
    Ms: 'static,
    Mdl: 'static,
    ElC: View<Ms>,
{
    pub document: web_sys::Document,
    pub mount_point: web_sys::Element,
    pub update: UpdateFn<Ms, Mdl, ElC, GMs>,
    pub sink: Option<SinkFn<Ms, Mdl, ElC, GMs>>,
    pub view: ViewFn<Mdl, ElC>,
    pub window_events: Option<WindowEventsFn<Ms, Mdl>>,
}