pub struct JobState {
pub job: JobStateJob,
pub result: JobStateResult,
pub pid: Option<u32>,
pub finished_at: Option<String>,
pub updated_at: String,
pub windows_job_name: Option<String>,
}Expand description
Persisted in state.json, updated as the job progresses.
Structure:
{
"job": { "id": "...", "status": "running", "started_at": "..." },
"result": { "exit_code": null, "signal": null, "duration_ms": null },
"updated_at": "..."
}Required fields per spec: job.id, job.status, job.started_at,
result.exit_code, result.signal, result.duration_ms, updated_at.
Option fields MUST be serialized as null (not omitted) so callers always
see consistent keys regardless of job lifecycle stage.
Fields§
§job: JobStateJob§result: JobStateResult§pid: Option<u32>Process ID (not part of the public spec; omitted when not available).
finished_at: Option<String>Finish time (not part of the nested result block; kept for internal use).
updated_at: StringLast time this state was written to disk (RFC 3339).
windows_job_name: Option<String>Windows-only: name of the Job Object used to manage the process tree. Present only when the supervisor successfully created and assigned a named Job Object; absent on non-Windows platforms and when creation fails (in which case tree management falls back to snapshot enumeration).