Expand description
Command execution engine.
This module provides command execution capabilities:
- Synchronous and asynchronous execution
- Timeout handling
- Streaming output
§Example
use shell_tunnel::execution::{Command, execute_simple};
// Simple one-shot execution
let result = execute_simple("echo hello").unwrap();
println!("Output: {}", result.text_output);
// Command with options
use std::time::Duration;
let cmd = Command::new("cargo build")
.timeout(Duration::from_secs(60))
.capture_output(true);Structs§
- Command
- A command to be executed in a shell session.
- Command
Builder - Builder for creating commands with fluent API.
- Command
Executor - Command executor for running commands in shell sessions.
- Execution
Result - Result of command execution.
- Output
Chunk - Streaming output chunk from execution.
Enums§
- Output
Source - Source of output data.
Constants§
- DEFAULT_
TIMEOUT - Default execution timeout.
Functions§
- execute_
simple - Simple one-shot command execution.
- execute_
with_ timeout - Execute a command with timeout.