pub struct SavedWork {
pub work: WorkRef,
pub revision: u64,
pub state: WorkState,
pub finished: Option<FinishedKind>,
pub fault: Option<String>,
pub deadline_utc: Option<SystemTime>,
}Expand description
One retained work’s saved view: everything observe reported plus the
absolute deadline.
Fields§
§work: WorkRefThe work’s identity (conversation + assigned turn id).
revision: u64The work’s revision at save time; restore continues the sequence from here, so a caller’s pre-save revision stays meaningful.
state: WorkStateThe work’s state at save time — Paused only for the paused phase
payload’s work. Accepted / Running / Faulted cannot be
checkpointed (their slots refuse to export), so a legitimate
envelope carries only terminal states and the one paused work.
finished: Option<FinishedKind>The terminal result when the work is Finished.
fault: Option<String>The fault reason when the work is Faulted.
deadline_utc: Option<SystemTime>The work’s deadline as an absolute UTC expiry. Monotonic deadlines have no wall-clock meaning across processes, so the remaining time is re-derived at restore — never re-granted in full.