(&self)
| 475 | } |
| 476 | |
| 477 | pub fn to_value(&self) -> serde_json::Value { |
| 478 | serde_json::to_value(self).unwrap_or_else(|_| { |
| 479 | serde_json::json!({ |
| 480 | "schema": PROGRAM_TRACE_SCHEMA, |
| 481 | "type": "program_execution", |
| 482 | "program_name": self.program_name, |
| 483 | "success": self.success, |
| 484 | "summary": self.summary, |
| 485 | "step_count": self.step_count, |
| 486 | "failed_steps": self.failed_steps, |
| 487 | "steps": [], |
| 488 | }) |
| 489 | }) |
| 490 | } |
| 491 | } |
| 492 | |
| 493 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] |
no outgoing calls