Struct wlan_statemachine::State
source · pub struct State<S> {
pub data: S,
/* private fields */
}
Expand description
Wrapper struct for a state S. Use in combination with StateTransition
.
Fields§
§data: S
Implementations§
source§impl<S> State<S>
impl<S> State<S>
sourcepub fn new(data: S) -> State<S>where
S: InitialState,
pub fn new(data: S) -> State<S>where S: InitialState,
Construct the initial state of a state machine.
sourcepub fn release_data(self) -> (Transition<S>, S)
pub fn release_data(self) -> (Transition<S>, S)
Releases the captured state data S
and provides a transition instance
to perform a compile time checked state transition.
Use this function when the state data S
is shared between multiple
states.