1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Utilities for defining MAF applications.
//!
//! An application is a collection of functionality such as stores, RPC functions, and
//! background tasks. The [`App`] struct contains the configuration for the application, and is
//! built using the [`AppBuilder`].
//!
//! ## Example
//! ```rust,no_run
//! use maf::prelude::*;
//!
//! // ... application functionality goes here ...
//!
//! fn build() -> App {
//! // Begin with a call to App::builder()
//! App::builder()
//! // Add stores, RPC functions, background tasks, etc.
//! // .store::<Message>()
//! // .rpc("set_message", set_message)
//! // .background(cleanup_task)
//! // .plugin(MyPlugin::new())
//! // Finish building the app
//! .build()
//! }
//!
//! // IMPORTANT: register the function that builds the app when using WASM
//! maf::register!(build);
//! ```
//!
//! ## APIs
//! [`AppBuilder`] provides methods to add functionality to the application, such as:
//! - Adding [`crate::Store`] with [`AppBuilder::store`]
//! - Registering [`crate::rpc`] functions with [`AppBuilder::rpc`]
//! - Adding background tasks with [`AppBuilder::background`]
//! - Registering plugins with [`AppBuilder::plugin`]
//! - Defining local state with [`AppBuilder::local`]
//! - Subscribing meta entries with [`AppBuilder::meta`]
pub
pub
pub
pub
pub use ;
pub use Local;
pub use ;
pub use Plugin;
pub use AppState;
pub use LocalStateError;