gstore
Global and local state management for GTK apps which implements the flux pattern. This crate targets apps written with gtk-rust-app framework.
A State can be any kind of data structure an application is based on. For a 'counter' app it might be a struct with a single u32 field. Actions are enums which represent the possible features of the app affecting the state.
Global store usage
// Given you have a global state
// Using the store macro a 'store' for this state
store!;
// The following public interface will be generated:
pub type Store = Store
/// Initialize the store and global state
///
/// # Arguments
/// - initializer: Initialize the state.
/// - reducer: Handle actions and mutate the state
/// - middlewares: Pre- and post-reduce handlers
Performance data
gstore can print basic performance information via the environment variabl GSTORE_PERF=1;
License
gstore is distributed under the terms of the GPL 3 license. See LICENSE for details.