pub struct WorkResult {
pub success: bool,
pub content: String,
pub error: Option<String>,
pub duration_ms: u64,
pub tokens_used: Option<u64>,
}Expand description
Result of work item execution.
Fields§
§success: boolWhether the work completed without error.
content: StringOutput produced by the worker.
error: Option<String>Error message if the work failed.
duration_ms: u64Wall-clock execution time in milliseconds.
tokens_used: Option<u64>Model tokens consumed, if tracked.
Trait Implementations§
Source§impl Clone for WorkResult
impl Clone for WorkResult
Source§fn clone(&self) -> WorkResult
fn clone(&self) -> WorkResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkResult
impl Debug for WorkResult
Source§impl<'de> Deserialize<'de> for WorkResult
impl<'de> Deserialize<'de> for WorkResult
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 WorkResult
impl RefUnwindSafe for WorkResult
impl Send for WorkResult
impl Sync for WorkResult
impl Unpin for WorkResult
impl UnsafeUnpin for WorkResult
impl UnwindSafe for WorkResult
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