1pub trait SubStore<GlobalState, SubState> {
5 type SubAction;
6 type Service;
7
8 fn state(&self) -> &SubState;
9 fn service(&mut self) -> &mut Self::Service;
10 fn state_and_service(&mut self) -> (&SubState, &mut Self::Service);
11 fn dispatch<A>(&mut self, action: A) -> bool
12 where
13 A: Into<Self::SubAction> + crate::EnablingCondition<SubState>;
14
15 fn dispatch_callback<T>(&mut self, callback: crate::Callback<T>, args: T) -> bool
16 where
17 T: 'static,
18 Self::SubAction: From<crate::AnyAction> + crate::EnablingCondition<SubState>;
19}