[][src]Module comp_state::prelude

Re-exports

pub use topo;
pub use crate::unmount::StateAccessUnmount;
pub use crate::unmount::Unmount;

Structs

StateAccess

Accessor struct that provides access to getting and setting the state of the stored type

Traits

ChangedState
CloneState

Functions

clone_state_with_topo_id

Clones the state of type T keyed to the given TopoId

do_once

call the provided function once and once only returns a unmmunt which will allow the do_once to repeat if .execute_if_activated() is called on the unmount. Example

execute_and_remove_unmounts
new_state
on_unmount
purge_and_reset_unseen_ids

Rudamentary Garbage Collection purges all unseen ids' state then resets the suneen ids list.

reset_unseen_id_list

Rudamentary Garbage Collection

set_state_with_topo_id

Sets the state of type T keyed to the given TopoId

state_exists_for_topo_id
unseen_ids
update_state_with_topo_id

Provides mutable access to the stored state type T.

use_state

Constructs a T accessor. T is stored keyed to the current topological context. The accessor always references this context therefore can you can set/update/ or get this T from anywhere.

use_state_current

Uses the current topological id to create a new state accessor