Expand description
Persistent reactive state for Rust GUI apps.
Re-exports§
pub use reactive::AmeState;pub use reactive::AmeStateNode;pub use reactive::Field;pub use reactive::ReactiveCell;pub use reactive::ReactiveMap;pub use store::StoreSubscription;pub use store::AmeStateSlice;pub use store::Open;pub use store::Schema;pub use store::StateScope;pub use store::StoreEvent;pub use store::StoreOp;pub use store::SubscriptionKind;pub use store::builder::StoreBuilder;pub use store::config::StoreConfig;pub use store::default::Store;pub use migration::MigrationContext;pub use migration::MigrationError;pub use migration::MigrationPlan;pub use migration::MigrationReport;pub use store::StoreBackend;pub use store::StoreExt;pub use erased_serde;pub use error_stack;pub use indexmap;pub use inventory;pub use serde;pub use uuid;pub use serde_json;
Modules§
- client
- errors
- migration
- observability
- What a running program can say about its own state.
- prelude
- What an ordinary program needs, in one import.
- reactive
- Reactive primitives: values that persist and notify.
- schema
- What this binary declares, collected at link time.
- shape
- What a declared field’s type is, answered by the compiler.
- store
- stores
Macros§
Structs§
- Already
Installed - A store handed to
install_globalwhile another open one was in place, handed back untouched. - Change
- Global
Store Guard - Closes the process-wide store when it goes out of scope.
- Id
- A key that is not a string, spelled once and kept that way.
- Reactive
Scope - Subscriptions held together, ending when the scope does.
- Signal
Subscription - Dropping this ends the subscription, so it has to be held for as long as the
callback should keep firing.
ReactiveScopeis where several are held together.
Enums§
- Init
Global - Why the process-wide store was not put in place.
- MapChange
Traits§
Functions§
- global_
store - The process-wide store.
- init_
global - Opens the process-wide store.
- install_
global - Puts a store that is already open in place as the process-wide one.
- shutdown
- Closes the process-wide store: writes what it still holds, stops its background thread and lets go of the file.
- shutdown_
async shutdown, awaited rather than blocked on: the closing write runs without holding the thread that awaits it.
Type Aliases§
- AmeData
- Migration
Result - What a migration step answers with: everything it can fail at, and nothing else.
- Storage
Result
Attribute Macros§
- amethystate
- Generates a persistent state wrapper for a struct.
- migrate
- Declares a migration step, discovered wherever it is written.