pub struct Task {
pub task_id: TaskId,
pub task_type: String,
pub status: TaskStatus,
pub input: BTreeMap<String, Value>,
pub output: TaskOutput,
pub progress: i32,
pub create_time: i64,
pub running_left_time: Option<i64>,
pub queuing_num: Option<i32>,
pub error_code: Option<i32>,
pub error_msg: Option<String>,
}Expand description
Task record returned by GET /task/{id}.
Fields§
§task_id: TaskIdIdentifier.
task_type: StringWire-format task type string (e.g. text_to_model, animate_rig).
status: TaskStatusCurrent status.
input: BTreeMap<String, Value>Echo of request parameters.
output: TaskOutputOutput URLs and flags.
progress: i32Progress percent 0–100.
create_time: i64Unix seconds.
running_left_time: Option<i64>Estimated seconds until completion; used by the polling backoff.
queuing_num: Option<i32>Queue depth ahead of this task.
error_code: Option<i32>Non-zero on failure.
error_msg: Option<String>Human-readable error message.
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
Source§impl JsonSchema for Task
impl JsonSchema for Task
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto 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