Skip to main content

machine_module

Attribute Macro machine_module 

Source
#[machine_module]
Expand description

Designates a module to be populated with the autogenerated code of a state machine.

The module must be empty and reside directly inside a module attributed with state_machine.

ยงExample

#[moku::state_machine]
mod blinky {
    #[moku::machine_module]
    mod machine {}

    use machine::State;

    struct Top;
    impl moku::TopState for Top {}
}