pub struct AgentExecution {
pub success: bool,
pub final_result: String,
pub steps_executed: usize,
pub duration_ms: u64,
pub data: Option<Value>,
pub metadata: Option<HashMap<String, Value>>,
}Expand description
Result of agent execution
Fields§
§success: boolWhether the execution was successful
final_result: StringFinal result message
steps_executed: usizeNumber of steps executed
duration_ms: u64Total execution time in milliseconds
data: Option<Value>Optional structured data
metadata: Option<HashMap<String, Value>>Optional metadata
Implementations§
Source§impl AgentExecution
impl AgentExecution
Sourcepub fn success(
final_result: String,
steps_executed: usize,
duration_ms: u64,
) -> Self
pub fn success( final_result: String, steps_executed: usize, duration_ms: u64, ) -> Self
Create a successful execution result
Sourcepub fn failure(error: String, steps_executed: usize, duration_ms: u64) -> Self
pub fn failure(error: String, steps_executed: usize, duration_ms: u64) -> Self
Create a failed execution result
Sourcepub fn with_metadata(self, metadata: HashMap<String, Value>) -> Self
pub fn with_metadata(self, metadata: HashMap<String, Value>) -> Self
Add metadata to the result
Trait Implementations§
Source§impl Clone for AgentExecution
impl Clone for AgentExecution
Source§fn clone(&self) -> AgentExecution
fn clone(&self) -> AgentExecution
Returns a duplicate of the value. Read more
1.0.0 · 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 AgentExecution
impl Debug for AgentExecution
Source§impl<'de> Deserialize<'de> for AgentExecution
impl<'de> Deserialize<'de> for AgentExecution
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 AgentExecution
impl RefUnwindSafe for AgentExecution
impl Send for AgentExecution
impl Sync for AgentExecution
impl Unpin for AgentExecution
impl UnwindSafe for AgentExecution
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