Expand description
A global Store
The store holds global app app data with static lifetime.
It can be manipulated by dispatching actions (See Action).
Each action is handled by the reducer - A function which matches the action and has a mutable ref to the state in the store.
The reducer must not have any side effects (E.g. saving the state to a file).
Side effects are implemented in middlewares (See Middleware).
Implementations
Create a new Store.
Arguments
- default_state: The initial state of the store.
- reducer: The root reducer for this store.
- middlewares: A list of Middleware.
Select a slice of the state where everything else is Default::default().
Select a slice of the state with receiving the whole state.
Dispatch the given arguments as an Action.
NOTE:
This is a placeholder since rustdoc server can not compile latest gtk yet The actual signature looks like this:
pub fn dispatch(&self, action: String, argument: Option<glib::Variant>)
Delegate GTK actions as gstore::Actions to this store.
NOTE:
This is a placeholder since rustdoc server can not compile latest gtk yet The actual signature looks like this:
pub fn delegate(&'static self) -> glib::Sender<(gdk4::gio::SimpleAction, Option<glib::Variant>)>