run abstract method

(PositionState, T?) run(
  1. PositionState state
)

Runs the middleware logic.

Takes the state from the previous middleware (or the initial state) and returns a tuple of:

  • The new PositionState (potentially modified)
  • Optional metadata of type T (or null if no data to report)

Middleware can modify both the anchor points and the config (e.g., for virtual references).

Implementation

(PositionState, T?) run(PositionState state);