|
1 | 1 | use crate::dom_types::{MessageMapper, View}; |
2 | | -use crate::vdom::{App, Effect, RenderTimestampDelta, ShouldRender}; |
| 2 | +use crate::vdom::{App, Effect, RenderTimestampDelta, ShouldRender, UndefinedGMsg}; |
3 | 3 | use futures::Future; |
4 | 4 | use std::{collections::VecDeque, convert::identity, rc::Rc}; |
5 | 5 |
|
6 | 6 | // ------ Orders ------ |
7 | 7 |
|
8 | | -pub trait Orders<Ms: 'static, GMs = ()> { |
| 8 | +pub trait Orders<Ms: 'static, GMs = UndefinedGMsg> { |
9 | 9 | type AppMs: 'static; |
10 | 10 | type Mdl: 'static; |
11 | 11 | type ElC: View<Self::AppMs> + 'static; |
@@ -96,7 +96,7 @@ pub trait Orders<Ms: 'static, GMs = ()> { |
96 | 96 | // ------ OrdersContainer ------ |
97 | 97 |
|
98 | 98 | #[allow(clippy::module_name_repetitions)] |
99 | | -pub struct OrdersContainer<Ms: 'static, Mdl: 'static, ElC: View<Ms>, GMs = ()> { |
| 99 | +pub struct OrdersContainer<Ms: 'static, Mdl: 'static, ElC: View<Ms>, GMs = UndefinedGMsg> { |
100 | 100 | pub(crate) should_render: ShouldRender, |
101 | 101 | pub(crate) effects: VecDeque<Effect<Ms, GMs>>, |
102 | 102 | app: App<Ms, Mdl, ElC, GMs>, |
@@ -200,7 +200,14 @@ impl<Ms: 'static, Mdl, ElC: View<Ms> + 'static, GMs> Orders<Ms, GMs> |
200 | 200 | // ------ OrdersProxy ------ |
201 | 201 |
|
202 | 202 | #[allow(clippy::module_name_repetitions)] |
203 | | -pub struct OrdersProxy<'a, Ms, AppMs: 'static, Mdl: 'static, ElC: View<AppMs>, GMs: 'static = ()> { |
| 203 | +pub struct OrdersProxy< |
| 204 | + 'a, |
| 205 | + Ms, |
| 206 | + AppMs: 'static, |
| 207 | + Mdl: 'static, |
| 208 | + ElC: View<AppMs>, |
| 209 | + GMs: 'static = UndefinedGMsg, |
| 210 | +> { |
204 | 211 | orders_container: &'a mut OrdersContainer<AppMs, Mdl, ElC, GMs>, |
205 | 212 | f: Rc<dyn Fn(Ms) -> AppMs>, |
206 | 213 | } |
|
0 commit comments