#[non_exhaustive]pub struct Task {Show 14 fields
pub id: String,
pub job_id: Option<String>,
pub operation: String,
pub status: TaskStatus,
pub message: Option<String>,
pub code: Option<String>,
pub credits: Option<f64>,
pub created_at: Option<String>,
pub started_at: Option<String>,
pub ended_at: Option<String>,
pub depends_on_tasks: BTreeMap<String, String>,
pub result: Option<TaskResult>,
pub payload: Option<Value>,
pub extra: BTreeMap<String, Value>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: String§job_id: Option<String>§operation: String§status: TaskStatus§message: Option<String>§code: Option<String>§credits: Option<f64>§created_at: Option<String>§started_at: Option<String>§ended_at: Option<String>§depends_on_tasks: BTreeMap<String, String>§result: Option<TaskResult>§payload: Option<Value>§extra: BTreeMap<String, Value>Implementations§
Source§impl Task
impl Task
pub fn is_finished(&self) -> bool
pub fn is_error(&self) -> bool
pub fn is_terminal(&self) -> bool
pub fn is_import_upload(&self) -> bool
pub fn upload_form(&self) -> Option<&UploadForm>
pub fn is_upload_ready(&self) -> bool
pub fn files(&self) -> impl Iterator<Item = &FileResult>
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
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