lgui-store 0.2.1

Application-scoped reactive state stores for LGUI
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::resources::Resources;

/// A typed, application-scoped data store.
///
/// Mutations are observed at the `StoreRuntime::update` boundary. Store methods therefore return
/// only business values and never describe UI invalidation.
pub trait StoreUnit: Send + Sync + 'static {
    const KEY: &'static str;

    fn create(resources: &Resources) -> Self;

    fn unit_name() -> &'static str {
        Self::KEY
    }
}