> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandbox Result • Rust AI Agent SDK

> SandboxResult: Result of a sandbox execution.

# SandboxResult

> Defined in the [**sandbox**](../modules/sandbox) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Result of a sandbox execution.

## Fields

| Name               | Type                   | Description                               |
| ------------------ | ---------------------- | ----------------------------------------- |
| `execution_id`     | `String`               | Unique execution identifier               |
| `status`           | `SandboxStatus`        | Execution status                          |
| `exit_code`        | `Option&lt;i32&gt;`    | Process exit code (None if not completed) |
| `stdout`           | `String`               | Standard output                           |
| `stderr`           | `String`               | Standard error                            |
| `duration_seconds` | `f64`                  | Execution duration in seconds             |
| `started_at`       | `Option&lt;f64&gt;`    | Start timestamp                           |
| `completed_at`     | `Option&lt;f64&gt;`    | Completion timestamp                      |
| `error`            | `Option&lt;String&gt;` | Error message if failed                   |
| `metadata`         | `HashMap&lt;String`    | Additional execution metadata             |
| `serde_json`       | `:Value&gt;`           | Additional execution metadata             |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new() -> Self
```

Create a new sandbox result.

### `success`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn success(&self) -> bool
```

Check if execution was successful.

### `output`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn output(&self) -> String
```

Get combined output (stdout + stderr).

### `start`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn start(&mut self) -> ()
```

Mark as started.

### `complete`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn complete(&mut self, exit_code: i32, stdout: String, stderr: String) -> ()
```

Mark as completed.

**Parameters:**

| Name        | Type     |
| ----------- | -------- |
| `exit_code` | `i32`    |
| `stdout`    | `String` |
| `stderr`    | `String` |

### `fail`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn fail(&mut self, error: impl Into<String>) -> ()
```

Mark as failed.

**Parameters:**

| Name    | Type                      |
| ------- | ------------------------- |
| `error` | `impl Into&lt;String&gt;` |

### `timeout`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn timeout(&mut self) -> ()
```

Mark as timed out.

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/sandbox/mod.rs#L191">
  `praisonai/src/sandbox/mod.rs` at line 191
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Database" icon="database" href="/docs/rust/database" />

  <Card title="Rust Sandbox" icon="box" href="/docs/rust/sandbox" />

  <Card title="Rust Code Execution" icon="terminal" href="/docs/rust/code-execution" />
</CardGroup>
