comp_state/prelude.rs
1/// Exports the following:
2///
3/// use_state associates a type T's state with a current topoolical context
4/// returning a copy of that state as well as an accsssor method to update
5/// that state
6///
7/// topo - re-export of topo crate. Needed to ensure a single version of topo
8/// is used throughout so that user topo::Ids match comp_state topo::Ids.
9///
10/// do_once - a function to do a block once and once only
11///
12/// set_state - set the state of type T in the current topological context
13///
14/// clone_state - clone the state of a type T in the current topological context
15///
16/// get_state_with_topo_id - clone the state of type T in the given topological context
17///
18/// set_state_with_topo_id - set the state of type T in the given topological context
19///
20/// update_state_with_topo_id - update the state of type T in the given topological
21/// context
22///
23/// purge_and_reset_unseed_ids - rudamentary gabrage collection, purgets any
24/// topological context state that has not been accessed since the last time
25/// this function was run
26///
27/// StateAccess - the access struct that enables a state to be udated or retrieved
28pub use topo;
29
30// Re exports
31pub use crate::helpers::do_once;
32pub use crate::state_access::{ChangedState, CloneState, StateAccess};
33pub use crate::state_functions::{
34 clone_state_with_topo_id, execute_and_remove_unmounts, new_state, on_unmount,
35 purge_and_reset_unseen_ids, reset_unseen_id_list, set_state_with_topo_id,
36 state_exists_for_topo_id, unseen_ids, update_state_with_topo_id, use_state, use_state_current,
37};
38pub use crate::unmount::{StateAccessUnmount, Unmount};