pub struct Task {Show 14 fields
pub id: String,
pub context_id: String,
pub state: State,
pub principal: Option<String>,
pub link: Link,
pub message: Option<String>,
pub ask_schema: Option<Value>,
pub artifacts: Vec<String>,
pub result: Option<Value>,
pub created: u64,
pub updated: u64,
pub history: Vec<Value>,
pub push: Vec<PushTarget>,
pub dirty: bool,
}Expand description
The durable task record.
Fields§
§id: String§context_id: String§state: State§principal: Option<String>§link: Link§message: Option<String>The status message (for input-required and terminal explanations).
ask_schema: Option<Value>The shape a gate’s answer must take (human.schema / ask_human).
Carried on the task because the QUESTION alone does not tell a client how to ask it. With the schema, “pick one of these three” renders as three options instead of a text box the person has to guess the wording for — and the answer is already the right shape when it comes back.
artifacts: Vec<String>Artifact ids delivered on this task.
result: Option<Value>The terminal result (a distillate / output).
created: u64§updated: u64§history: Vec<Value>The transition history (state, ts).
push: Vec<PushTarget>Where to POST this task’s updates, for a caller that would rather be told than hold a stream open. Durable with the task, so a restart keeps the promise the caller was given.
dirty: boolImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Task
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnsafeUnpin for Task
impl UnwindSafe for Task
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more