pub struct TaskResult {
pub task_id: TaskId,
pub status: TaskStatus,
pub output: Option<TaskOutput>,
pub error: Option<String>,
pub execution_time_ms: u64,
}
Expand description
Task result
Fields§
§task_id: TaskId
The unique identifier of the task that was executed
status: TaskStatus
Final status of the task execution
output: Option<TaskOutput>
Optional output data produced by the task
error: Option<String>
Optional error message if the task failed
execution_time_ms: u64
Total execution time in milliseconds
Implementations§
Source§impl TaskResult
impl TaskResult
Sourcepub fn success(output: impl Into<TaskOutput>) -> Self
pub fn success(output: impl Into<TaskOutput>) -> Self
Create a successful task result
Sourcepub fn with_task_id(self, task_id: TaskId) -> Self
pub fn with_task_id(self, task_id: TaskId) -> Self
Set task ID
Sourcepub fn with_execution_time(self, time_ms: u64) -> Self
pub fn with_execution_time(self, time_ms: u64) -> Self
Set execution time
Trait Implementations§
Source§impl Clone for TaskResult
impl Clone for TaskResult
Source§fn clone(&self) -> TaskResult
fn clone(&self) -> TaskResult
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for TaskResult
impl RefUnwindSafe for TaskResult
impl Send for TaskResult
impl Sync for TaskResult
impl Unpin for TaskResult
impl UnwindSafe for TaskResult
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