pub enum WorkState {
Accepted,
Running,
Paused,
Finished,
Faulted,
}Expand description
The session’s management view of a work.
This is the runtime’s coordination vocabulary, not a kernel state machine:
the actual execution result is carried by FinishedKind, which reuses
the driver’s existing TurnResult vocabulary.
Variants§
Accepted
The session holds the work and its execution resources; the worker has
not yet begun advancing the runner. Accepted does not mean the
model has been called.
Running
The runner is advancing the work. submit returns
SessionError::Busy; observe reads the published view only.
Paused
The complete paused outcome came back to the session. The conversation
is still busy; only an explicit resume continues it.
Finished
Terminal: the work completed or was interrupted; see
WorkObservation::finished. The conversation accepts a next work.
Faulted
Terminal: the worker exited abnormally (panic or runner rejection), so
no complete outcome exists. The fault reason is retained (see
WorkObservation::fault); no recovery scene is fabricated and no
complete snapshot is invented, because the material may be
unrecoverable. The conversation refuses new work with
SessionError::Faulted until the harness handles it.