Crate state_macro

Crate state_macro 

Source

Macros§

with_state
A macro for decluttering mutable state computations.

Attribute Macros§

stateful
An attribute macro that transforms a function to be stateful.
stateful_cloned
Like [stateful], but passes state.clone() to state functions instead of state. Useful when the state type is like Rc<RefCell<T>>. Equivalent to stateful_expr(State, state.clone()).
stateful_expr
Like [stateful], but allows specifying a custom expression when passing the state variable. A more general version of stateful_cloned.