Macro with_state

Source
macro_rules! with_state {
    ($state:expr => $block:block) => { ... };
}
Expand description

便利宏,用于在指定作用域内设置 State

§示例

use mf_rules_expression::with_state;

let state = Arc::new(State::default());

with_state!(state => {
    // 在这个块内,State 是活跃的
});
// State 在这里已经被清理