pub struct JobStatus {
pub state: JobState,
pub progress: u8,
pub message: Option<String>,
pub error: Option<String>,
pub updated_at: DateTime<Utc>,
}Expand description
Job status information.
Fields§
§state: JobStateCurrent state
progress: u8Progress percentage (0-100)
message: Option<String>Status message
error: Option<String>Error message (if failed)
updated_at: DateTime<Utc>Last updated timestamp
Implementations§
Source§impl JobStatus
impl JobStatus
Sourcepub fn processing() -> Self
pub fn processing() -> Self
Create a processing status.
Sourcepub fn with_progress(self, progress: u8) -> Self
pub fn with_progress(self, progress: u8) -> Self
Update progress.
Sourcepub fn with_message(self, message: impl Into<String>) -> Self
pub fn with_message(self, message: impl Into<String>) -> Self
Update message.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JobStatus
impl<'de> Deserialize<'de> for JobStatus
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 JobStatus
impl RefUnwindSafe for JobStatus
impl Send for JobStatus
impl Sync for JobStatus
impl Unpin for JobStatus
impl UnwindSafe for JobStatus
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