Type Alias Store

Source
pub type Store = Store<State, ClusterService, Action>;

Aliased Type§

pub struct Store {
    pub state: StateWrapper<State>,
    pub service: ClusterService,
    /* private fields */
}

Fields§

§state: StateWrapper<State>

Current State.

Immutable access can be gained using store.state.get(). Mutation can only happen inside reducer.

§service: ClusterService

Trait Implementations§

Source§

impl SubStore<State, P2pState> for Store

Source§

type SubAction = P2pAction

Source§

type Service = ClusterService

Source§

fn state(&self) -> &P2pState

Source§

fn service(&mut self) -> &mut Self::Service

Source§

fn state_and_service(&mut self) -> (&P2pState, &mut Self::Service)

Source§

fn dispatch<A>(&mut self, action: A) -> bool
where A: Into<Self::SubAction> + EnablingCondition<P2pState>,

Source§

fn dispatch_callback<T>(&mut self, callback: Callback<T>, args: T) -> bool
where T: 'static, P2pAction: From<AnyAction> + EnablingCondition<P2pState>,