pub struct Job {Show 13 fields
pub id: String,
pub model_id: String,
pub capability: Capability,
pub payload: JsonValue,
pub state: JobState,
pub progress: JobProgress,
pub queue_reason: Option<String>,
pub preview: Option<Vec<u8>>,
pub result: Vec<String>,
pub error: Option<String>,
pub submitted_at: i64,
pub started_at: Option<i64>,
pub finished_at: Option<i64>,
}Expand description
A discrete unit of work with progress and a persisted terminal result. Its
on-disk form (in jobs.json) is internal, so field names are the native
snake_case.
Fields§
§id: String§model_id: String§capability: Capability§payload: JsonValue§state: JobState§progress: JobProgress§queue_reason: Option<String>§preview: Option<Vec<u8>>The latest preview frame. Held in memory only — never persisted.
result: Vec<String>§error: Option<String>§submitted_at: i64§started_at: Option<i64>§finished_at: Option<i64>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Job
impl<'de> Deserialize<'de> for Job
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 Job
Auto Trait Implementations§
impl Freeze for Job
impl RefUnwindSafe for Job
impl Send for Job
impl Sync for Job
impl Unpin for Job
impl UnsafeUnpin for Job
impl UnwindSafe for Job
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