pub struct TaskState {Show 17 fields
pub id: TaskId,
pub task_type: String,
pub description: String,
pub owner_thread_id: String,
pub parent_task_id: Option<TaskId>,
pub status: TaskStatus,
pub error: Option<String>,
pub result: Option<Value>,
pub result_ref: Option<TaskResultRef>,
pub checkpoint: Option<Value>,
pub supports_resume: bool,
pub attempt: u32,
pub created_at_ms: u64,
pub updated_at_ms: u64,
pub completed_at_ms: Option<u64>,
pub cancel_requested_at_ms: Option<u64>,
pub metadata: Value,
}Expand description
Durable task state stored inside a dedicated task thread (task:<task_id>).
Fields§
§id: TaskId§task_type: String§description: String§owner_thread_id: String§parent_task_id: Option<TaskId>§status: TaskStatus§error: Option<String>§result: Option<Value>§result_ref: Option<TaskResultRef>§checkpoint: Option<Value>§supports_resume: bool§attempt: u32§created_at_ms: u64§updated_at_ms: u64§completed_at_ms: Option<u64>§cancel_requested_at_ms: Option<u64>§metadata: ValueImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TaskState
impl<'de> Deserialize<'de> for TaskState
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
Source§impl State for TaskState
impl State for TaskState
Source§fn state_ref<'a>(
doc: &'a DocCell,
base: Path,
sink: PatchSink<'a>,
) -> Self::Ref<'a>
fn state_ref<'a>( doc: &'a DocCell, base: Path, sink: PatchSink<'a>, ) -> Self::Ref<'a>
Create a state reference at the specified path. Read more
Source§fn from_value(value: &Value) -> TireaResult<Self>
fn from_value(value: &Value) -> TireaResult<Self>
Deserialize this type from a JSON value.
Source§fn to_value(&self) -> TireaResult<Value>
fn to_value(&self) -> TireaResult<Value>
Serialize this type to a JSON value.
Source§fn diff_ops(old: &Self, new: &Self, base_path: &Path) -> TireaResult<Vec<Op>>
fn diff_ops(old: &Self, new: &Self, base_path: &Path) -> TireaResult<Vec<Op>>
Compare two instances and emit minimal ops for changed fields. Read more
Source§fn register_lattice(_registry: &mut LatticeRegistry)
fn register_lattice(_registry: &mut LatticeRegistry)
Register lattice fields into the given registry. Read more
Source§fn lattice_keys() -> &'static [&'static str]
fn lattice_keys() -> &'static [&'static str]
Return the JSON keys of fields annotated with
#[tirea(lattice)]. Read moreAuto Trait Implementations§
impl Freeze for TaskState
impl RefUnwindSafe for TaskState
impl Send for TaskState
impl Sync for TaskState
impl Unpin for TaskState
impl UnwindSafe for TaskState
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