Skip to main content

transition

Function transition 

Source
pub fn transition<T, S, Next>(
    state: StateOwned<T, S>,
    _token: T::TransitionToken,
) -> TransitionCall<T, S, Next>
where T: StateMachineImpl, T::Standin: Transition<S, Next>,
Expand description

Creates a callable transition requiring the definition’s arguments.

This low-level function requires the implementation’s private transition capability. It is mainly used by generated code and crate-internal tests. Implementation methods should normally use transition!, which expands to the private helpers generated by StateMachineImpl!.

The returned [TransitionCall] is one-shot. Calling .call(args) checks args against the declaration’s Transition::F signature and then retags the wrapper from S to Next. With tracing, the callsite captured here is appended to the returned state’s trace.