#[superstate]macro only.Expand description
Attribute for tagging a superstate.
This macro does nothing on its own but is detected by the state_machine
macro when added to a method.
It accepts the following attributes:
-
#[superstate(name = "CustomSuperstateName")]Set the name of the variant that will be part of the state enum.
-
#[superstate(superstate = "superstate_name")]Set the superstate of the superstate.
-
#[superstate(entry_action = "entry_action_name")]Set the entry action of the superstate.
-
#[superstate(exit_action = "exit_action_name")]Set the exit action of the superstate.
-
#[superstate(local_storage("field_name_a: &'a mut FieldTypeA"))]Add local storage to this superstate. These will be added as fields to the enum variant. It is crucial to understand that superstates never own their data. Instead it is always borrowed from the underlying state or superstate. This means the fields should be references with an associated lifetime
'a.